diff --git a/mobile/android/base/AwesomeBar.java b/mobile/android/base/AwesomeBar.java index c59f3eabd19..fef7a1b1538 100644 --- a/mobile/android/base/AwesomeBar.java +++ b/mobile/android/base/AwesomeBar.java @@ -417,6 +417,10 @@ public class AwesomeBar extends Activity implements GeckoEventListener { } AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo; selectedItem = list.getItemAtPosition(info.position); + if (! (selectedItem instanceof Cursor)) { + Log.e(LOGTAG, "item at " + info.position + " is not a Cursor"); + return; + } Cursor cursor = (Cursor)selectedItem; title = cursor.getString(cursor.getColumnIndexOrThrow(URLColumns.TITLE)); }