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.
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 @@
* @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 @@
* @return The WebView's title (or url) or null.
*/
public String getTitle() {
- return mPickerData.mTitle;
+ if (mPickerData != null) {
+ return mPickerData.mTitle;
+ }
+ return null;
}
/**