aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorSam Whited <sam@samwhited.com>2014-11-07 22:36:30 -0500
committerSam Whited <sam@samwhited.com>2014-11-09 07:00:40 -0500
commitcc34c60255c4b7c055491d291f0f81f5191caa06 (patch)
tree7ce7481a912a512b4756f8f51cd365aa6d417ad4 /src/main/java
parent1a3327f2b12493dcd86b4032127020a41eec620d (diff)
Don't crash on packets with no "from" specified
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/eu/siacs/conversations/parser/PresenceParser.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/PresenceParser.java b/src/main/java/eu/siacs/conversations/parser/PresenceParser.java
index 8393585e..ba3f1645 100644
--- a/src/main/java/eu/siacs/conversations/parser/PresenceParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/PresenceParser.java
@@ -22,7 +22,8 @@ public class PresenceParser extends AbstractParser implements
public void parseConferencePresence(PresencePacket packet, Account account) {
PgpEngine mPgpEngine = mXmppConnectionService.getPgpEngine();
if (packet.hasChild("x", "http://jabber.org/protocol/muc#user")) {
- final Conversation muc = mXmppConnectionService.find(account,
+ final Conversation muc = packet.getFrom() == null ? null : mXmppConnectionService.find(
+ account,
packet.getFrom().toBareJid());
if (muc != null) {
boolean before = muc.getMucOptions().online();