aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-08-28 21:04:00 +0200
committerChristian Schneppe <christian@pix-art.de>2018-08-28 21:04:00 +0200
commitfb0d155e3afc1da881f3cb79a29d1eed23cd3ac3 (patch)
tree8d4bd8ad85fac528dc4ffff2bd37c867f7a932b8 /src/main/java
parente21da762dc99cfa6e8881a5c1ac2aa892de7762e (diff)
catch NPE on inviteUser
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/de/pixart/messenger/ui/XmppActivity.java6
1 files changed, 5 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 f52b2d72c..3ab6bfc6a 100644
--- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
@@ -943,7 +943,11 @@ public abstract class XmppActivity extends ActionBarActivity {
}
public void inviteUser() {
- if (xmppConnectionServiceBound && !xmppConnectionService.multipleAccounts()) {
+ if (!xmppConnectionServiceBound) {
+ Toast.makeText(this, R.string.not_connected_try_again, Toast.LENGTH_SHORT).show();
+ return;
+ }
+ if (!xmppConnectionService.multipleAccounts()) {
Account mAccount = xmppConnectionService.getAccounts().get(0);
String user = Jid.of(mAccount.getJid()).getLocal();
String domain = Jid.of(mAccount.getJid()).getDomain();