aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui/util
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-02-18 21:01:07 +0100
committerChristian Schneppe <christian@pix-art.de>2019-02-18 21:01:07 +0100
commit1079f26d902a7cd5666e5159778a6828a102e40e (patch)
tree6c60e9a52fdfe66245dbc3fa3d4f00fbcf5f135e /src/main/java/de/pixart/messenger/ui/util
parent87232ef8a03f421b765fbb6717d2d578a4965fd9 (diff)
fix NPE while getting user
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/util')
-rw-r--r--src/main/java/de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java b/src/main/java/de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java
index a7fe3490b..c229dbf00 100644
--- a/src/main/java/de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java
+++ b/src/main/java/de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java
@@ -127,7 +127,7 @@ public final class MucDetailsContextMenuHelper {
sendPrivateMessage.setEnabled(mucOptions.allowPm());
} else {
sendPrivateMessage.setVisible(true);
- sendPrivateMessage.setVisible(!isGroupChat && mucOptions.allowPm() && user.getRole().ranks(MucOptions.Role.VISITOR));
+ sendPrivateMessage.setVisible(!isGroupChat && mucOptions.allowPm() && (user != null && user.getRole().ranks(MucOptions.Role.VISITOR)));
}
}