diff options
author | Christian Schneppe <christian@pix-art.de> | 2019-02-18 21:01:07 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2019-02-18 21:01:07 +0100 |
commit | 1079f26d902a7cd5666e5159778a6828a102e40e (patch) | |
tree | 6c60e9a52fdfe66245dbc3fa3d4f00fbcf5f135e /src/main/java/de/pixart/messenger | |
parent | 87232ef8a03f421b765fbb6717d2d578a4965fd9 (diff) |
fix NPE while getting user
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java | 2 |
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))); } } |