check if axolotl service is initialized before displaying keys

This commit is contained in:
Christian Schneppe 2018-02-19 21:07:33 +01:00
parent 57176b4a99
commit b63525da9f

View file

@ -586,10 +586,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()) {