aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/eu/siacs/conversations/parser/MessageParser.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
index e2028c7b..8e559bd5 100644
--- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
@@ -27,8 +27,10 @@ public class MessageParser extends AbstractParser implements
private Message parseChat(MessagePacket packet, Account account) {
final Jid jid = packet.getFrom();
- Conversation conversation = mXmppConnectionService
- .findOrCreateConversation(account, jid.toBareJid(), false);
+ if (jid == null) {
+ return null;
+ }
+ Conversation conversation = mXmppConnectionService.findOrCreateConversation(account, jid.toBareJid(), false);
updateLastseen(packet, account, true);
String pgpBody = getPgpBody(packet);
Message finishedMessage;
@@ -61,6 +63,9 @@ public class MessageParser extends AbstractParser implements
boolean properlyAddressed = (!packet.getTo().isBareJid())
|| (account.countPresences() == 1);
final Jid from = packet.getFrom();
+ if (from == null) {
+ return null;
+ }
Conversation conversation = mXmppConnectionService
.findOrCreateConversation(account, from.toBareJid(), false);
String presence;