diff options
author | Leon Scroggins III <scroggo@google.com> | 2010-09-17 08:21:24 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-09-17 08:21:24 -0700 |
commit | 241f4f579230ae8394c71a5f10705d7f978ef535 (patch) | |
tree | bd7b8efbee20a5436ba7207088ccaff75b3dcbcb /src/com/android/browser/BrowserActivity.java | |
parent | 4d5db5dcd1b4a4e3ab358f60ff4fab9517c9ccb2 (diff) | |
parent | e680381839dee8d0ebdc6dd8cf882f66ea5c6c1a (diff) | |
download | packages_apps_Browser-241f4f579230ae8394c71a5f10705d7f978ef535.zip packages_apps_Browser-241f4f579230ae8394c71a5f10705d7f978ef535.tar.gz packages_apps_Browser-241f4f579230ae8394c71a5f10705d7f978ef535.tar.bz2 |
am e6803818: am a9e35b6e: Prevent a null pointer exception.
Merge commit 'e680381839dee8d0ebdc6dd8cf882f66ea5c6c1a'
* commit 'e680381839dee8d0ebdc6dd8cf882f66ea5c6c1a':
Prevent a null pointer exception.
Diffstat (limited to 'src/com/android/browser/BrowserActivity.java')
-rw-r--r-- | src/com/android/browser/BrowserActivity.java | 8 |
1 files changed, 6 insertions, 2 deletions
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 @@ 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. |