From 5110dbd0d5a4d1bacbeb9cd3ae85e19bffa73fbd Mon Sep 17 00:00:00 2001 From: Michal Mocny Date: Wed, 10 Jul 2013 15:33:34 -0400 Subject: [PATCH] [ios][CB-4147] Fixing crash when calling open() on an already open window. --- src/ios/CDVInAppBrowser.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m index b8724cb..bbdc497 100644 --- a/src/ios/CDVInAppBrowser.m +++ b/src/ios/CDVInAppBrowser.m @@ -150,7 +150,9 @@ - (void)show:(CDVInvokedUrlCommand*)command { - [self.viewController presentModalViewController:self.inAppBrowserViewController animated:YES]; + if ([self.inAppBrowserViewController isViewLoaded] && self.inAppBrowserViewController.view.window) + return; + [self.viewController presentModalViewController:self.inAppBrowserViewController animated:YES]; } - (void)openInCordovaWebView:(NSURL*)url withOptions:(NSString*)options