From af655e4c3f78d1ae567d492e88d5f3cfb32d439d 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 aba760c2d..0107f0256 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -2506,7 +2506,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]);