From 5722d976ce82a74f1955a65016363bd276c14ce4 Mon Sep 17 00:00:00 2001 From: macdonst Date: Thu, 23 Feb 2012 12:36:38 -0500 Subject: [PATCH] Fixing app crash when clicking Menu or Back buttons while splashscreen is being shown. --- framework/src/org/apache/cordova/DroidGap.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/framework/src/org/apache/cordova/DroidGap.java b/framework/src/org/apache/cordova/DroidGap.java index 4062bf95..d0c039a8 100755 --- a/framework/src/org/apache/cordova/DroidGap.java +++ b/framework/src/org/apache/cordova/DroidGap.java @@ -908,7 +908,9 @@ public class DroidGap extends Activity implements CordovaInterface { this.appView.loadUrl("about:blank"); // Forward to plugins - this.pluginManager.onDestroy(); + if (this.pluginManager != null) { + this.pluginManager.onDestroy(); + } } else { this.endActivity(); @@ -924,7 +926,9 @@ public class DroidGap extends Activity implements CordovaInterface { public void postMessage(String id, Object data) { // Forward to plugins - this.pluginManager.postMessage(id, data); + if (this.pluginManager != null) { + this.pluginManager.postMessage(id, data); + } } /**