aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-12-23 21:19:38 +0100
committerDaniel Gultsch <daniel@gultsch.de>2016-12-23 21:19:38 +0100
commit9972f5eabc19e4afdd2c29cd9fa9957345089aab (patch)
tree81684ab33eff187f0d2c056179867a5b40a253d4 /src
parent28c64c2bd10263fc4370d3edf80a465dad46cd5a (diff)
fixed npe cause by race condition when axolotl service isn't initialized
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Account.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Account.java b/src/main/java/eu/siacs/conversations/entities/Account.java
index 024f5889..5728c87b 100644
--- a/src/main/java/eu/siacs/conversations/entities/Account.java
+++ b/src/main/java/eu/siacs/conversations/entities/Account.java
@@ -632,6 +632,9 @@ public class Account extends AbstractEntity {
if (otr != null) {
fingerprints.add(new XmppUri.Fingerprint(XmppUri.FingerprintType.OTR,otr));
}
+ if (axolotlService == null) {
+ return fingerprints;
+ }
fingerprints.add(new XmppUri.Fingerprint(XmppUri.FingerprintType.OMEMO,axolotlService.getOwnFingerprint().substring(2),axolotlService.getOwnDeviceId()));
for(XmppAxolotlSession session : axolotlService.findOwnSessions()) {
if (session.getTrust().isVerified() && session.getTrust().isActive()) {