am e6803818: am a9e35b6e: Prevent a null pointer exception.

Merge commit 'e680381839dee8d0ebdc6dd8cf882f66ea5c6c1a'

* commit 'e680381839dee8d0ebdc6dd8cf882f66ea5c6c1a':
  Prevent a null pointer exception.
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index ca63305..c3d3d9c 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -4146,11 +4146,15 @@
             // Nothing to do.
             return;
         }
+        Tab t = mTabControl.getCurrentTab();
+        if (t == null) {
+            // There is no current tab so we cannot toggle the error console
+            return;
+        }
 
         mShouldShowErrorConsole = flag;
 
-        ErrorConsoleView errorConsole = mTabControl.getCurrentTab()
-                .getErrorConsole(true);
+        ErrorConsoleView errorConsole = t.getErrorConsole(true);
 
         if (flag) {
             // Setting the show state of the console will cause it's the layout to be inflated.