From c35ac11a421d99315d708a9cbb7c05cb96d9f90c Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 19 Feb 2018 17:26:38 +0100 Subject: [PATCH] check if axolotl service is initialized before displaying keys --- .../eu/siacs/conversations/ui/ContactDetailsActivity.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java index 48107a4ab..0e517cf1b 100644 --- a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java @@ -468,10 +468,11 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp }); } } - if (Config.supportOmemo()) { + final AxolotlService axolotlService = contact.getAccount().getAxolotlService(); + if (Config.supportOmemo() && axolotlService != null) { boolean skippedInactive = false; boolean showsInactive = false; - for (final XmppAxolotlSession session : contact.getAccount().getAxolotlService().findSessionsForContact(contact)) { + for (final XmppAxolotlSession session : axolotlService.findSessionsForContact(contact)) { final FingerprintStatus trust = session.getTrust(); hasKeys |= !trust.isCompromised(); if (!trust.isActive()) {