diff --git a/src/android/InAppBrowser.java b/src/android/InAppBrowser.java index 76dc150cc..849d5c36f 100644 --- a/src/android/InAppBrowser.java +++ b/src/android/InAppBrowser.java @@ -533,7 +533,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; } }