Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5fe721f5 authored by Patrick Scott's avatar Patrick Scott
Browse files

Fix NPE in addMessageToConsole.

CallbackProxy should always check for client during handleMessage.

Bug: 3060412
Change-Id: I0a84fa2ce21cc46d9b215b18a700119c7c12a7f2
parent 3ca506b6
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -710,6 +710,9 @@ class CallbackProxy extends Handler {
                break;

            case ADD_MESSAGE_TO_CONSOLE:
                if (mWebChromeClient == null) {
                    break;
                }
                String message = msg.getData().getString("message");
                String sourceID = msg.getData().getString("sourceID");
                int lineNumber = msg.getData().getInt("lineNumber");
@@ -786,7 +789,9 @@ class CallbackProxy extends Handler {
                        host, realm, username, password);
                break;
            case SET_INSTALLABLE_WEBAPP:
                if (mWebChromeClient != null) {
                    mWebChromeClient.setInstallableWebApp();
                }
                break;
        }
    }