From c54948e33421e6c4d5ffc947192dde9edddd3396 Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Wed, 3 Jun 2020 21:40:55 +0200 Subject: [PATCH] fix crash: configure when lc is off --- Classes/LinphoneManager.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index bdcead1ad..cffe0dcba 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -589,8 +589,9 @@ static void linphone_iphone_global_state_changed(LinphoneCore *lc, LinphoneGloba // dispatch the notification asynchronously dispatch_async(dispatch_get_main_queue(), ^(void) { + if (theLinphoneCore && linphone_core_get_global_state(theLinphoneCore) != LinphoneGlobalOff) [NSNotificationCenter.defaultCenter postNotificationName:kLinphoneGlobalStateUpdate object:self userInfo:dict]; - }); + }); } - (void)globalStateChangedNotificationHandler:(NSNotification *)notif {