janpio closed pull request #291: In app browser crash fix for '_system'  target.
URL: https://github.com/apache/cordova-plugin-inappbrowser/pull/291
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/android/InAppBrowser.java b/src/android/InAppBrowser.java
index 9a695db4d..16e0c0e41 100644
--- a/src/android/InAppBrowser.java
+++ b/src/android/InAppBrowser.java
@@ -279,7 +279,9 @@ else if (action.equals("show")) {
             this.cordova.getActivity().runOnUiThread(new Runnable() {
                 @Override
                 public void run() {
-                    dialog.show();
+                       if(dialog != null){
+                          dialog.show();
+                       }
                 }
             });
             PluginResult pluginResult = new 
PluginResult(PluginResult.Status.OK);
@@ -290,7 +292,9 @@ else if (action.equals("hide")) {
             this.cordova.getActivity().runOnUiThread(new Runnable() {
                 @Override
                 public void run() {
-                    dialog.hide();
+                       if(dialog != null){
+                          dialog.hide();
+                       }
                 }
             });
             PluginResult pluginResult = new 
PluginResult(PluginResult.Status.OK);
@@ -1258,4 +1262,4 @@ public void onReceivedHttpAuthRequest(WebView view, 
HttpAuthHandler handler, Str
             super.onReceivedHttpAuthRequest(view, handler, host, realm);
         }
     }
-}
\ No newline at end of file
+}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to