prevent null pointer when trying to display device fingerprints of not existing sessions

This commit is contained in:
Daniel Gultsch 2015-10-11 14:27:09 +02:00
parent b23cb5a9e4
commit 9e1393bc1c

View file

@ -619,6 +619,9 @@ public abstract class XmppActivity extends Activity {
protected boolean addFingerprintRow(LinearLayout keys, final Account account, final String fingerprint, boolean highlight) {
final XmppAxolotlSession.Trust trust = account.getAxolotlService()
.getFingerprintTrust(fingerprint);
if (trust == null) {
return false;
}
return addFingerprintRowWithListeners(keys, account, fingerprint, highlight, trust, true,
new CompoundButton.OnCheckedChangeListener() {
@Override