aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2016-12-25 18:45:17 +0100
committerChristian Schneppe <christian@pix-art.de>2016-12-25 18:45:17 +0100
commit344d74f21fb2e942f2d9bbb56bd11ec3ec39c82d (patch)
treeabb7daea1daaf232bd63b6a42904c5eed62d741c /src
parent3f34a3aff0902b37b4e94b5d8c1c38b8285532ab (diff)
fixed npe cause by race condition when axolotl service isn't initialized
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/pixart/messenger/entities/Account.java3
1 files changed, 3 insertions, 0 deletions
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()) {