forked from mirror/monocles_chat
Fix out of bounds crash (Cheogram)
This commit is contained in:
parent
8b62c9c661
commit
dcac523a07
1 changed files with 3 additions and 0 deletions
|
@ -387,6 +387,9 @@ public class ConversationsOverviewFragment extends XmppFragment {
|
|||
|
||||
@Override
|
||||
public boolean onContextItemSelected(MenuItem item) {
|
||||
int pos = ((AdapterContextMenuInfo) item.getMenuInfo()).position;
|
||||
if (conversations == null || conversations.size() < pos || pos < 0) return false;
|
||||
|
||||
Conversation conversation = conversations.get(((AdapterContextMenuInfo) item.getMenuInfo()).position);
|
||||
ConversationFragment fragment = new ConversationFragment();
|
||||
fragment.setHasOptionsMenu(false);
|
||||
|
|
Loading…
Reference in a new issue