summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/BrowserHistoryPage.java
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-08-19 15:16:05 -0700
committerJohn Reck <jreck@google.com>2011-08-19 15:16:05 -0700
commit54ed3aa8417f4c6a27eecb9caf10f742a705b6e0 (patch)
tree3cbc53a5959521b1cb19123286f206850af9644a /src/com/android/browser/BrowserHistoryPage.java
parent42229bcdea8a1623d9ac3fce099793a3767fb14d (diff)
downloadandroid_packages_apps_Gello-54ed3aa8417f4c6a27eecb9caf10f742a705b6e0.tar.gz
android_packages_apps_Gello-54ed3aa8417f4c6a27eecb9caf10f742a705b6e0.tar.bz2
android_packages_apps_Gello-54ed3aa8417f4c6a27eecb9caf10f742a705b6e0.zip
Fix crash
Bug: 5180400 onContextItemSelected is apparantly unordered and goes to the "wrong" fragment first, causing this crash Change-Id: I8d9df87d5799882190bc0fdfee5720c97d2b8f7a
Diffstat (limited to 'src/com/android/browser/BrowserHistoryPage.java')
-rw-r--r--src/com/android/browser/BrowserHistoryPage.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/browser/BrowserHistoryPage.java b/src/com/android/browser/BrowserHistoryPage.java
index 6625e550..09c6f978 100644
--- a/src/com/android/browser/BrowserHistoryPage.java
+++ b/src/com/android/browser/BrowserHistoryPage.java
@@ -388,7 +388,11 @@ public class BrowserHistoryPage extends Fragment
if (menuInfo == null) {
return false;
}
- HistoryItem historyItem = (HistoryItem) getTargetView(menuInfo);
+ View targetView = getTargetView(menuInfo);
+ if (!(targetView instanceof HistoryItem)) {
+ return false;
+ }
+ HistoryItem historyItem = (HistoryItem) targetView;
String url = historyItem.getUrl();
String title = historyItem.getName();
Activity activity = getActivity();