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
1 changed files with 3 additions and 2 deletions

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 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()) {