From e10a6c5b87d5d4b4871fdf31bbc9a7ef8b8d6ff1 Mon Sep 17 00:00:00 2001 From: Andreas Straub Date: Wed, 29 Jul 2015 02:56:47 +0200 Subject: [PATCH] Fix NPE: consider unknown keys UNDECIDED --- .../siacs/conversations/crypto/axolotl/XmppAxolotlSession.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/crypto/axolotl/XmppAxolotlSession.java b/src/main/java/eu/siacs/conversations/crypto/axolotl/XmppAxolotlSession.java index b8d7dcbaf..d58b2dd8f 100644 --- a/src/main/java/eu/siacs/conversations/crypto/axolotl/XmppAxolotlSession.java +++ b/src/main/java/eu/siacs/conversations/crypto/axolotl/XmppAxolotlSession.java @@ -64,7 +64,8 @@ public class XmppAxolotlSession { } protected SQLiteAxolotlStore.Trust getTrust() { - return sqLiteAxolotlStore.getFingerprintTrust(fingerprint); + SQLiteAxolotlStore.Trust trust = sqLiteAxolotlStore.getFingerprintTrust(fingerprint); + return (trust == null)? SQLiteAxolotlStore.Trust.UNDECIDED : trust; } @Nullable