From 061a7799b9a2796f56afe472750e6115280f31b3 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Wed, 19 Sep 2018 11:24:45 +0200 Subject: [PATCH] fix crash when calls --- Classes/LinphoneManager.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 8fec2f9a8..359169c0b 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -2466,7 +2466,7 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) { } AVAudioSessionRouteDescription *newRoute = [AVAudioSession sharedInstance].currentRoute; - if (newRoute) { + if (newRoute && newRoute.outputs.count > 0) { NSString *route = newRoute.outputs[0].portType; LOGI(@"Current audio route is [%s]", [route UTF8String]);