fixed crashing on unparsed jids

This commit is contained in:
iNPUTmice 2014-12-15 17:36:16 +01:00
parent 183e31ade1
commit ab2187dbdf

View file

@ -60,12 +60,12 @@ public class MessageParser extends AbstractParser implements
}
private Message parseOtrChat(MessagePacket packet, Account account) {
boolean properlyAddressed = (!packet.getTo().isBareJid())
|| (account.countPresences() == 1);
final Jid to = packet.getTo();
final Jid from = packet.getFrom();
if (from == null) {
if (to == null || from == null) {
return null;
}
boolean properlyAddressed = !to.isBareJid() || account.countPresences() == 1;
Conversation conversation = mXmppConnectionService
.findOrCreateConversation(account, from.toBareJid(), false);
String presence;