timbru31 commented on a change in pull request #503: (android) Defensive code 
to prevent NULL reference exceptions for async
URL: 
https://github.com/apache/cordova-plugin-inappbrowser/pull/503#discussion_r362495008
 
 

 ##########
 File path: src/android/InAppBrowser.java
 ##########
 @@ -1066,12 +1070,16 @@ public void postMessage(String data) {
                 lp.height = WindowManager.LayoutParams.MATCH_PARENT;
 
                 dialog.setContentView(main);
-                dialog.show();
+                if(dialog != null){
 
 Review comment:
   And add a space after the `if` and before the `{` for all new guards 🙃

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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