check if axolotl service is initialized before displaying keys

This commit is contained in:
Daniel Gultsch 2018-02-19 17:26:38 +01:00
parent 742727504f
commit c35ac11a42

View file

@ -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 skippedInactive = false;
boolean showsInactive = 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(); final FingerprintStatus trust = session.getTrust();
hasKeys |= !trust.isCompromised(); hasKeys |= !trust.isCompromised();
if (!trust.isActive()) { if (!trust.isActive()) {