Don't crash on packets with no "from" specified

This commit is contained in:
Sam Whited 2014-11-07 22:36:30 -05:00
parent 1a3327f2b1
commit cc34c60255

View File

@ -22,7 +22,8 @@ public class PresenceParser extends AbstractParser implements
public void parseConferencePresence(PresencePacket packet, Account account) {
PgpEngine mPgpEngine = mXmppConnectionService.getPgpEngine();
if (packet.hasChild("x", "http://jabber.org/protocol/muc#user")) {
final Conversation muc = mXmppConnectionService.find(account,
final Conversation muc = packet.getFrom() == null ? null : mXmppConnectionService.find(
account,
packet.getFrom().toBareJid());
if (muc != null) {
boolean before = muc.getMucOptions().online();