~singpolyma/cheogram-android

37993c04514e54264d031c9a8c9a054e43cf7bc6 — Stephen Paul Weber 2 months ago fc9f0ec
Fix possible NPE
1 files changed, 4 insertions(+), 1 deletions(-)

M src/main/java/eu/siacs/conversations/ui/ConversationsOverviewFragment.java
M src/main/java/eu/siacs/conversations/ui/ConversationsOverviewFragment.java => src/main/java/eu/siacs/conversations/ui/ConversationsOverviewFragment.java +4 -1
@@ 372,7 372,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);