mirror of
https://codeberg.org/monocles/monocles_chat.git
synced 2025-01-15 22:22:22 +01:00
Fix possible NPE
This commit is contained in:
parent
cd3774b3dc
commit
0aa9b9c47d
1 changed files with 4 additions and 1 deletions
|
@ -403,7 +403,10 @@ public class ConversationsOverviewFragment extends XmppFragment {
|
|||
|
||||
@Override
|
||||
public boolean onContextItemSelected(MenuItem item) {
|
||||
int pos = ((AdapterContextMenuInfo) item.getMenuInfo()).position;
|
||||
final var info = ((AdapterContextMenuInfo) item.getMenuInfo());
|
||||
if (info == null) return false;
|
||||
|
||||
int pos = info.position;
|
||||
if (conversations == null || conversations.size() <= pos || pos < 0) return false;
|
||||
|
||||
Conversation conversation = conversations.get(pos);
|
||||
|
|
Loading…
Reference in a new issue