From 344d74f21fb2e942f2d9bbb56bd11ec3ec39c82d Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sun, 25 Dec 2016 18:45:17 +0100 Subject: fixed npe cause by race condition when axolotl service isn't initialized --- src/main/java/de/pixart/messenger/entities/Account.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/de/pixart/messenger/entities/Account.java b/src/main/java/de/pixart/messenger/entities/Account.java index 2642845b6..e040d29dd 100644 --- a/src/main/java/de/pixart/messenger/entities/Account.java +++ b/src/main/java/de/pixart/messenger/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()) { -- cgit v1.2.3