From ca21a38cb691aff03fb6a376cbd22e91f3c02ce1 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sat, 31 Aug 2019 15:21:36 +0200 Subject: catch npe on participants context menu --- src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java') diff --git a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java index cdd4a00df..8b1980c6c 100644 --- a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java @@ -304,6 +304,11 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers @Override public boolean onContextItemSelected(MenuItem item) { + final User user = mUserPreviewAdapter.getSelectedUser(); + if (user == null) { + Toast.makeText(this, R.string.unable_to_perform_this_action, Toast.LENGTH_SHORT).show(); + return true; + } if (!MucDetailsContextMenuHelper.onContextItemSelected(item, mUserPreviewAdapter.getSelectedUser(), this)) { return super.onContextItemSelected(item); } -- cgit v1.2.3