aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-05-16 12:43:38 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-05-20 03:48:14 +0200
commit9658146575841c402f1492bcc53b02bdddc4d458 (patch)
tree30973c3ddc0dedff18f3037cdd2de9609b22f000 /src/main/java/eu/siacs
parent1b5631c835d34fc9f7a3474b015a21ffc64ed0d2 (diff)
fixed npe in new message parser
Diffstat (limited to 'src/main/java/eu/siacs')
-rw-r--r--src/main/java/eu/siacs/conversations/parser/MessageParser.java4
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 d254a863..d2fa2c24 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);