From 0912af3cc9a19d8a443326c4fd8b1bc31d9a587d Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Thu, 12 Nov 2015 14:09:09 +0100 Subject: [PATCH] LinphoneManager: check call params are valid before using them --- Classes/LinphoneManager.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 16d1d17d8..de3310467 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -1880,6 +1880,11 @@ static void audioRouteChangeListenerCallback(void *inUserData, // 1 - (void)acceptCall:(LinphoneCall *)call evenWithVideo:(BOOL)video { LinphoneCallParams *lcallParams = linphone_core_create_call_params(theLinphoneCore, call); + if (!lcallParams) { + LOGW(@"Could not create call parameters for %p, call has probably already ended.", call); + return; + } + if ([self lpConfigBoolForKey:@"edge_opt_preference"]) { bool low_bandwidth = self.network == network_2g; if (low_bandwidth) {