diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2014-05-16 22:44:54 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2014-05-16 22:44:54 +0200 |
commit | a0a5ca958596e47e273b04f0608acf23825abf7e (patch) | |
tree | ce8174247944e3ee9b1d1ec93233fddb65a40ec7 /src/eu/siacs | |
parent | 225447f2f53068c17d79b6abd240c962388c65b5 (diff) |
fixed npe for otr sessions with non contacts
Diffstat (limited to 'src/eu/siacs')
-rw-r--r-- | src/eu/siacs/conversations/entities/Conversation.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/eu/siacs/conversations/entities/Conversation.java b/src/eu/siacs/conversations/entities/Conversation.java index 20c70d29..88d6279e 100644 --- a/src/eu/siacs/conversations/entities/Conversation.java +++ b/src/eu/siacs/conversations/entities/Conversation.java @@ -269,11 +269,15 @@ public class Conversation extends AbstractEntity { return false; } else { String foreignPresence = this.otrSession.getSessionID().getUserID(); - if (!getContact().getPresences().containsKey(foreignPresence)) { - this.resetOtrSession(); - return false; + if (getContact()==null) { + return true; + } else { + if (!getContact().getPresences().containsKey(foreignPresence)) { + this.resetOtrSession(); + return false; + } + return true; } - return true; } } |