diff --git a/src/android/InAppBrowser.java b/src/android/InAppBrowser.java index eed595016..990fd2dad 100644 --- a/src/android/InAppBrowser.java +++ b/src/android/InAppBrowser.java @@ -536,7 +536,11 @@ public void run() { // NB: wait for about:blank before dismissing public void onPageFinished(WebView view, String url) { if (dialog != null && !cordova.getActivity().isFinishing()) { - dialog.dismiss(); + try { + dialog.dismiss(); + } catch(IllegalArgumentException e) { + LOG.e(LOG_TAG, "Caught exception when trying to close IAB dialog: " + e); + } dialog = null; } }