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

View file

@ -375,7 +375,9 @@ public class MessageParser extends AbstractParser implements
if (displayed != null) { if (displayed != null) {
if (packet.fromAccount(account)) { if (packet.fromAccount(account)) {
Conversation conversation = mXmppConnectionService.find(account,counterpart.toBareJid()); Conversation conversation = mXmppConnectionService.find(account,counterpart.toBareJid());
mXmppConnectionService.markRead(conversation); if (conversation != null) {
mXmppConnectionService.markRead(conversation);
}
} else { } else {
updateLastseen(packet, account, true); updateLastseen(packet, account, true);
final Message displayedMessage = mXmppConnectionService.markMessage(account, from.toBareJid(), displayed.getAttribute("id"), Message.STATUS_SEND_DISPLAYED); final Message displayedMessage = mXmppConnectionService.markMessage(account, from.toBareJid(), displayed.getAttribute("id"), Message.STATUS_SEND_DISPLAYED);