Updated Branches: refs/heads/master a9f129248 -> 5110dbd0d
[ios][CB-4147] Fixing crash when calling open() on an already open window. Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/5110dbd0 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/5110dbd0 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/5110dbd0 Branch: refs/heads/master Commit: 5110dbd0d5a4d1bacbeb9cd3ae85e19bffa73fbd Parents: a9f1292 Author: Michal Mocny <[email protected]> Authored: Wed Jul 10 15:33:34 2013 -0400 Committer: Michal Mocny <[email protected]> Committed: Wed Jul 10 15:33:38 2013 -0400 ---------------------------------------------------------------------- src/ios/CDVInAppBrowser.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/5110dbd0/src/ios/CDVInAppBrowser.m ---------------------------------------------------------------------- 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
