From 658edc86a67a5ea661775842d782dee4aff0c29c Mon Sep 17 00:00:00 2001 From: Paul Cartier Date: Mon, 11 May 2020 14:20:37 +0200 Subject: [PATCH] Prevent crash when openining app after bg call finished Only happened in the settings view before the call starts --- Classes/LinphoneAppDelegate.m | 1 + Classes/PhoneMainView.m | 1 + 2 files changed, 2 insertions(+) diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index 9565118fe..456bdea36 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -63,6 +63,7 @@ } - (void)applicationWillEnterForeground:(UIApplication *)application { + LOGI(@"%@", NSStringFromSelector(_cmd)); [LinphoneManager.instance startLinphoneCore]; [LinphoneManager.instance.fastAddressBook reloadFriends]; [NSNotificationCenter.defaultCenter postNotificationName:kLinphoneMessageReceived object:nil]; diff --git a/Classes/PhoneMainView.m b/Classes/PhoneMainView.m index 1a99c8d2e..ea8e725bc 100644 --- a/Classes/PhoneMainView.m +++ b/Classes/PhoneMainView.m @@ -425,6 +425,7 @@ static RootViewManager *rootViewManagerInstance = nil; case LinphoneCallReleased: if ([UIApplication sharedApplication].applicationState == UIApplicationStateBackground) { dispatch_async(dispatch_get_main_queue(), ^{ + [PhoneMainView.instance popToView:DialerView.compositeViewDescription]; [CoreManager.instance stopLinphoneCore]; }); }