Fix crash

 Bug: 5180400
 onContextItemSelected is apparantly unordered and goes to the
 "wrong" fragment first, causing this crash

Change-Id: I8d9df87d5799882190bc0fdfee5720c97d2b8f7a
diff --git a/src/com/android/browser/BrowserBookmarksPage.java b/src/com/android/browser/BrowserBookmarksPage.java
index 46521cb..2c38334 100644
--- a/src/com/android/browser/BrowserBookmarksPage.java
+++ b/src/com/android/browser/BrowserBookmarksPage.java
@@ -154,7 +154,10 @@
 
     @Override
     public boolean onContextItemSelected(MenuItem item) {
-        BookmarkContextMenuInfo i = (BookmarkContextMenuInfo)item.getMenuInfo();
+        if (!(item.getMenuInfo() instanceof BookmarkContextMenuInfo)) {
+            return false;
+        }
+        BookmarkContextMenuInfo i = (BookmarkContextMenuInfo) item.getMenuInfo();
         // If we have no menu info, we can't tell which item was selected.
         if (i == null) {
             return false;