Fix NPE when using LOCATION_CHANGE exec bridge.

This commit is contained in:
Andrew Grieve 2012-09-06 14:40:13 -04:00
parent 65a397fb63
commit 6ca6d88bff

View File

@ -111,8 +111,8 @@ public class CordovaWebViewClient extends WebViewClient {
String callbackId = url.substring(idx3 + 1, idx4); String callbackId = url.substring(idx3 + 1, idx4);
String jsonArgs = url.substring(idx4 + 1); String jsonArgs = url.substring(idx4 + 1);
PluginResult r = appView.pluginManager.exec(service, action, callbackId, jsonArgs, true /* async */); PluginResult r = appView.pluginManager.exec(service, action, callbackId, jsonArgs, true /* async */);
String callbackString = r.toCallbackString(callbackId);
if (r != null) { if (r != null) {
String callbackString = r.toCallbackString(callbackId);
appView.sendJavascript(callbackString); appView.sendJavascript(callbackString);
} }
} }