mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 718904 - Avoid crashing if longtap does not return a Cursor item. r=mfinkle
This commit is contained in:
parent
b9befea8b7
commit
caf2abb335
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user