You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2012/09/18 19:52:51 UTC

[13/14] android commit: Fix NPE when using LOCATION_CHANGE exec bridge.

Fix NPE when using LOCATION_CHANGE exec bridge.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/6ca6d88b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/6ca6d88b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/6ca6d88b

Branch: refs/heads/master
Commit: 6ca6d88bff783198aaa92979e88805b73dbb1832
Parents: 65a397f
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Sep 6 14:40:13 2012 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Sep 18 13:24:36 2012 -0400

----------------------------------------------------------------------
 .../org/apache/cordova/CordovaWebViewClient.java   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/6ca6d88b/framework/src/org/apache/cordova/CordovaWebViewClient.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebViewClient.java b/framework/src/org/apache/cordova/CordovaWebViewClient.java
index 596411f..75d3590 100755
--- a/framework/src/org/apache/cordova/CordovaWebViewClient.java
+++ b/framework/src/org/apache/cordova/CordovaWebViewClient.java
@@ -111,8 +111,8 @@ public class CordovaWebViewClient extends WebViewClient {
 		String callbackId = url.substring(idx3 + 1, idx4);
 		String jsonArgs   = url.substring(idx4 + 1);
         PluginResult r = appView.pluginManager.exec(service, action, callbackId, jsonArgs, true /* async */);
-        String callbackString = r.toCallbackString(callbackId);
         if (r != null) {
+            String callbackString = r.toCallbackString(callbackId);
             appView.sendJavascript(callbackString);
         }
 	}