diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-05-16 12:43:38 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-05-20 03:48:14 +0200 |
commit | 9658146575841c402f1492bcc53b02bdddc4d458 (patch) | |
tree | 30973c3ddc0dedff18f3037cdd2de9609b22f000 /src/main/java/eu/siacs/conversations/parser | |
parent | 1b5631c835d34fc9f7a3474b015a21ffc64ed0d2 (diff) |
fixed npe in new message parser
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/parser/MessageParser.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index d254a8635..d2fa2c247 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -375,7 +375,9 @@ public class MessageParser extends AbstractParser implements if (displayed != null) { if (packet.fromAccount(account)) { Conversation conversation = mXmppConnectionService.find(account,counterpart.toBareJid()); - mXmppConnectionService.markRead(conversation); + if (conversation != null) { + mXmppConnectionService.markRead(conversation); + } } else { updateLastseen(packet, account, true); final Message displayedMessage = mXmppConnectionService.markMessage(account, from.toBareJid(), displayed.getAttribute("id"), Message.STATUS_SEND_DISPLAYED); |