From f576d184601d816ed78ce235ba801d8377cd04fb Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Fri, 20 Jan 2012 17:39:27 +0100 Subject: [PATCH] Fix ipad crash when receiving a new call while a call already exists --- Classes/PhoneViewController.m | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Classes/PhoneViewController.m b/Classes/PhoneViewController.m index b1f1214a8..cb803e988 100644 --- a/Classes/PhoneViewController.m +++ b/Classes/PhoneViewController.m @@ -268,7 +268,14 @@ otherButtonTitles:nil]; mIncomingCallActionSheet.actionSheetStyle = UIActionSheetStyleDefault; - [mIncomingCallActionSheet showInView:self.parentViewController.view]; + if ([LinphoneManager runningOnIpad]) { + if (self.modalViewController != nil) + [mIncomingCallActionSheet showInView:[self.modalViewController view]]; + else + [mIncomingCallActionSheet showInView:self.parentViewController.view]; + } else { + [mIncomingCallActionSheet showInView:self.parentViewController.view]; + } [mIncomingCallActionSheet release]; }