diff options
author | Patrick Scott <phanna@android.com> | 2009-04-28 08:03:29 -0400 |
---|---|---|
committer | Patrick Scott <phanna@android.com> | 2009-04-28 08:03:29 -0400 |
commit | 20abe047a9f424a916e1b2a5d8b614b9b466e924 (patch) | |
tree | edb2310504d3066f918ebb0f3883edf9ec5bfa88 /src/com/android/browser/TabControl.java | |
parent | 761b3b5a23c06b64b9ecb99953665d2059e3b145 (diff) | |
download | packages_apps_browser-20abe047a9f424a916e1b2a5d8b614b9b466e924.zip packages_apps_browser-20abe047a9f424a916e1b2a5d8b614b9b466e924.tar.gz packages_apps_browser-20abe047a9f424a916e1b2a5d8b614b9b466e924.tar.bz2 |
Check for null before accessing mPickerData.
It could be null when switching to a parent tab since the parent tab will be
restored before showing the tab picker. This clears mPickerData before building
the tab picker.
Diffstat (limited to 'src/com/android/browser/TabControl.java')
-rw-r--r-- | src/com/android/browser/TabControl.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/com/android/browser/TabControl.java b/src/com/android/browser/TabControl.java index 0e93453..581d144 100644 --- a/src/com/android/browser/TabControl.java +++ b/src/com/android/browser/TabControl.java @@ -249,7 +249,10 @@ class TabControl { * @return The WebView's url or null. */ public String getUrl() { - return mPickerData.mUrl; + if (mPickerData != null) { + return mPickerData.mUrl; + } + return null; } /** @@ -260,7 +263,10 @@ class TabControl { * @return The WebView's title (or url) or null. */ public String getTitle() { - return mPickerData.mTitle; + if (mPickerData != null) { + return mPickerData.mTitle; + } + return null; } /** |