diff options
author | Christian Schneppe <christian@pix-art.de> | 2019-06-08 14:51:06 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2019-06-08 14:51:06 +0200 |
commit | 7cf5b7c6fa44d8b0a776472212f2a0a9f81f8edf (patch) | |
tree | 1435cadf1eeb8667e9396edc83e9a5ada0ab70b3 /src/main/java/de/pixart/messenger/ui | |
parent | 6856e84abd40835e78b3873a4070709faa4604bf (diff) |
fix some more NPE
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/XmppActivity.java | 3 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/util/MucDetailsContextMenuHelper.java | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java index cea89ebb4..bcdcafe37 100644 --- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java +++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java @@ -1022,6 +1022,9 @@ public abstract class XmppActivity extends ActionBarActivity { } private boolean AdHocInvite(Account account) { + if (!xmppConnectionServiceBound) { + return false; + } XmppConnection.Features features = account.getXmppConnection().getFeatures(); Log.d(Config.LOGTAG, "Invite available: " + features.adhocinvite); return features.adhocinvite; 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 7775bc114..aaf2a39ec 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 != null && user.getRole().ranks(MucOptions.Role.VISITOR))); + sendPrivateMessage.setEnabled(user != null && mucOptions.allowPm() && user.getRole().ranks(MucOptions.Role.VISITOR)); } } |