aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-12-03 00:05:41 +0100
committeriNPUTmice <daniel@gultsch.de>2014-12-03 00:06:57 +0100
commiteb0f8c08bdc17e4246ef7a22f321f3a1a87b2e4b (patch)
treeccd22cea7e8d079fd70258b3f616a57bb8156c7c /src/main/java/eu/siacs
parent39a3f372dd7b6d2cd1752c7c755fefe6866bc3c0 (diff)
safety net in joinMuc
Diffstat (limited to 'src/main/java/eu/siacs')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index 128f61a1..9cc4c2c6 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -1301,10 +1301,12 @@ public class XmppConnectionService extends Service {
account.pendingConferenceJoins.remove(conversation);
account.pendingConferenceLeaves.remove(conversation);
if (account.getStatus() == Account.State.ONLINE) {
- Log.d(Config.LOGTAG,
- "joining conversation " + conversation.getContactJid());
- String nick = conversation.getMucOptions().getProposedNick();
- Jid joinJid = conversation.getMucOptions().createJoinJid(nick);
+ final String nick = conversation.getMucOptions().getProposedNick();
+ final Jid joinJid = conversation.getMucOptions().createJoinJid(nick);
+ if (joinJid == null) {
+ return; //safety net
+ }
+ Log.d(Config.LOGTAG,account.getJid().toBareJid().toString()+": joining conversation " + joinJid.toString());
PresencePacket packet = new PresencePacket();
packet.setFrom(conversation.getAccount().getJid());
packet.setTo(joinJid);