From eb0f8c08bdc17e4246ef7a22f321f3a1a87b2e4b Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Wed, 3 Dec 2014 00:05:41 +0100 Subject: [PATCH] safety net in joinMuc --- .../conversations/services/XmppConnectionService.java | 10 ++++++---- 1 file 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);