fix NPE in setShouldShowErrorConsole

    Bug: 3405955
    The delayed start of the controller due to the auto-login
    can leave the browser with no tab;
    this change checks the current tab before accessing it.

Change-Id: If1bb6de22c837fd2190e6b9220a194ba64ce345c
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index 9bce3cd..dd243b4 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -621,6 +621,7 @@
 
     @Override
     public void setShouldShowErrorConsole(Tab tab, boolean flag) {
+        if (tab == null) return;
         ErrorConsoleView errorConsole = tab.getErrorConsole(true);
         if (flag) {
             // Setting the show state of the console will cause it's the layout