fixed npe in new message parser

This commit is contained in:
Daniel Gultsch 2015-05-16 12:43:38 +02:00
parent 1b5631c835
commit 9658146575
1 changed files with 3 additions and 1 deletions

View File

@ -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);