diff options
-rw-r--r-- | src/com/android/browser/view/BookmarkExpandableView.java | 11 |
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); } |