fixed crashing on unparsed jids

This commit is contained in:
iNPUTmice 2014-12-15 17:36:16 +01:00
parent 183e31ade1
commit ab2187dbdf
1 changed files with 4 additions and 4 deletions

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 from = packet.getFrom();
if (from == null) {
final Jid to = packet.getTo();
final Jid from = packet.getFrom();
if (to == null || from == null) {
return null;
}
boolean properlyAddressed = !to.isBareJid() || account.countPresences() == 1;
Conversation conversation = mXmppConnectionService
.findOrCreateConversation(account, from.toBareJid(), false);
String presence;