From 1079f26d902a7cd5666e5159778a6828a102e40e Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Mon, 18 Feb 2019 21:01:07 +0100 Subject: fix NPE while getting user --- .../java/de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/de/pixart') 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))); } } -- cgit v1.2.3