Check LinphoneCore ptr validity before using it

This commit is contained in:
Pierre-Eric Pelloux-Prayer 2011-11-08 14:33:57 +01:00
parent 58e9256f79
commit 2ef541de04

View file

@ -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);