Skip to content

Commit

Permalink
fix(android): avoid to crash the app closing the InAppBrowser (apache…
Browse files Browse the repository at this point in the history
  • Loading branch information
Makiwin committed Sep 26, 2024
1 parent e2d8429 commit d8bdd32
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/android/InAppBrowser.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit d8bdd32

Please sign in to comment.