summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeon Scroggins III <scroggo@google.com>2010-09-16 15:30:15 -0400
committerLeon Scroggins III <scroggo@google.com>2010-09-16 15:30:15 -0400
commita9e35b6e3101fafb07e6bb4282e7dfc4dcfdc193 (patch)
tree525bd1528ddd4283d6b139cb0d5efce7232d6d7c /src
parent26b9ad1c695b627df0f6cab28df016c7fb71cafd (diff)
downloadpackages_apps_Browser-a9e35b6e3101fafb07e6bb4282e7dfc4dcfdc193.zip
packages_apps_Browser-a9e35b6e3101fafb07e6bb4282e7dfc4dcfdc193.tar.gz
packages_apps_Browser-a9e35b6e3101fafb07e6bb4282e7dfc4dcfdc193.tar.bz2
Prevent a null pointer exception.
Bug: 3004709 Change-Id: I0594f8725601cf0e99dd2809d3571af6bfe1a056
Diffstat (limited to 'src')
-rw-r--r--src/com/android/browser/BrowserActivity.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index e98ab43..aca7003 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -3737,11 +3737,15 @@ public class BrowserActivity extends Activity
// 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.