summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Reck <jreck@android.com>2013-07-03 14:35:31 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-07-03 14:35:31 -0700
commitaf9a1097a549a08aec5121526f789c0ccd5984e2 (patch)
tree342ed539c05377b1e3c3f9ac46e2b2957040a056
parentb3ad6cd78079322805eb9407dca75886a28706c6 (diff)
parent0905de394983373bdc419c3d30b2969d5412d265 (diff)
downloadpackages_apps_Browser-af9a1097a549a08aec5121526f789c0ccd5984e2.zip
packages_apps_Browser-af9a1097a549a08aec5121526f789c0ccd5984e2.tar.gz
packages_apps_Browser-af9a1097a549a08aec5121526f789c0ccd5984e2.tar.bz2
am 0905de39: Merge "NPE in bookmark grid when using mouse"
* commit '0905de394983373bdc419c3d30b2969d5412d265': NPE in bookmark grid when using mouse
-rw-r--r--src/com/android/browser/view/BookmarkExpandableView.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/com/android/browser/view/BookmarkExpandableView.java b/src/com/android/browser/view/BookmarkExpandableView.java
index 7badaf5..5f8601b 100644
--- a/src/com/android/browser/view/BookmarkExpandableView.java
+++ b/src/com/android/browser/view/BookmarkExpandableView.java
@@ -183,11 +183,14 @@ public class BookmarkExpandableView extends ExpandableListView
@Override
public boolean showContextMenuForChild(View originalView) {
- int groupPosition = (Integer) originalView.getTag(R.id.group_position);
- int childPosition = (Integer) originalView.getTag(R.id.child_position);
+ Integer groupPosition = (Integer) originalView.getTag(R.id.group_position);
+ Integer childPosition = (Integer) originalView.getTag(R.id.child_position);
- mContextMenuInfo = new BookmarkContextMenuInfo(childPosition,
- groupPosition);
+ if (groupPosition == null || childPosition == null) {
+ return false;
+ }
+
+ mContextMenuInfo = new BookmarkContextMenuInfo(childPosition, groupPosition);
if (getParent() != null) {
getParent().showContextMenuForChild(this);
}