aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-08-31 15:21:36 +0200
committerChristian Schneppe <christian@pix-art.de>2019-08-31 15:21:36 +0200
commitca21a38cb691aff03fb6a376cbd22e91f3c02ce1 (patch)
tree487326f3353b23d575117bb4ed77636518cbc8f4 /src/main/java/de/pixart
parent4142360189a66efee8561fcbbef0963bce104348 (diff)
catch npe on participants context menu
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java5
1 files changed, 5 insertions, 0 deletions
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);
}