diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-06-25 17:32:58 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-06-25 17:32:58 +0200 |
commit | 5db04a37bd5b7acc41a8f2dad941fabd9a6a97e8 (patch) | |
tree | e3408dbca307de6b4c395876eb321089b2388993 /src/eu/siacs/conversations/parser/PresenceParser.java | |
parent | 31657974bfb3e7cab10956bb9661794f4f4cdb43 (diff) |
fixed two rare npe
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/parser/PresenceParser.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/parser/PresenceParser.java b/src/eu/siacs/conversations/parser/PresenceParser.java index 2003d4cd..8cc57bad 100644 --- a/src/eu/siacs/conversations/parser/PresenceParser.java +++ b/src/eu/siacs/conversations/parser/PresenceParser.java @@ -37,7 +37,10 @@ public class PresenceParser extends AbstractParser { } public void parseContactPresence(PresencePacket packet, Account account) { - String[] fromParts = packet.getAttribute("from").split("/"); + if (packet.getFrom()==null) { + return; + } + String[] fromParts = packet.getFrom().split("/"); String type = packet.getAttribute("type"); if (fromParts[0].equals(account.getJid())) { if (fromParts.length == 2) { |