background: fix crash if no config is present

This commit is contained in:
Gautier Pelloux-Prayer 2016-05-10 15:08:13 +02:00
parent 122500e398
commit 1269f9b923

View file

@ -1672,7 +1672,7 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) {
// handle proxy config if any
if (proxyCfg) {
const char *refkey = linphone_proxy_config_get_ref_key(proxyCfg);
const char *refkey = proxyCfg ? linphone_proxy_config_get_ref_key(proxyCfg) : NULL;
BOOL pushNotifEnabled = (refkey && strcmp(refkey, "push_notification") == 0);
if ([LinphoneManager.instance lpConfigBoolForKey:@"backgroundmode_preference"] || pushNotifEnabled) {
// For registration register