Bug 696683 - handleGeckoMessage throws java.lang.NullPointerException on startup [r=dougt]
authorFabrice Desré <fabrice@mozilla.com>
Mon, 24 Oct 2011 14:08:24 -0700
changeset 81594 1d37f263df5f4fa971983f47c60b10ec10783ee8
parent 81593 04a7317963b91d1efbfbd93997fc40d5ad9af001
child 81595 d0de6c7720d24ce4fd8714c705ff4cd7dc8a4c04
push idunknown
push userunknown
push dateunknown
reviewersdougt
bugs696683
milestone10.0a1
Bug 696683 - handleGeckoMessage throws java.lang.NullPointerException on startup [r=dougt]
embedding/android/GeckoApp.java
--- a/embedding/android/GeckoApp.java
+++ b/embedding/android/GeckoApp.java
@@ -474,16 +474,20 @@ abstract public class GeckoApp
                 mBrowserToolbar.setTitle(uri);
                 mBrowserToolbar.setFavicon(null);
             }
         });
     }
 
     void handleDocumentStart(final int tabId) {
         Tab tab = Tabs.getInstance().getTab(tabId);
+
+        if (tab == null)
+            return;
+
         tab.setLoading(true);
         
         if (!Tabs.getInstance().isSelectedTab(tab))
             return;
 
         mMainHandler.post(new Runnable() { 
             public void run() {
                 mBrowserToolbar.setProgressVisibility(true);