From 2ef541de045dc46c818d7bfc11e23f6ab2132f8c Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Tue, 8 Nov 2011 14:33:57 +0100 Subject: [PATCH] Check LinphoneCore ptr validity before using it --- Classes/LinphoneUI/LinphoneManager.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Classes/LinphoneUI/LinphoneManager.m b/Classes/LinphoneUI/LinphoneManager.m index a5fe0a59c..6018af979 100644 --- a/Classes/LinphoneUI/LinphoneManager.m +++ b/Classes/LinphoneUI/LinphoneManager.m @@ -791,6 +791,8 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach } -(void) beginInterruption { + if (!theLinphoneCore) + return; LinphoneCall* c = linphone_core_get_current_call(theLinphoneCore); ms_message("Sound interruption detected!"); if (c) { @@ -799,6 +801,8 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach } -(void) endInterruption { + if (!theLinphoneCore) + return; ms_message("Sound interruption ended!"); const MSList* c = linphone_core_get_calls(theLinphoneCore);