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

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) { protected boolean addFingerprintRow(LinearLayout keys, final Account account, final String fingerprint, boolean highlight) {
final XmppAxolotlSession.Trust trust = account.getAxolotlService() final XmppAxolotlSession.Trust trust = account.getAxolotlService()
.getFingerprintTrust(fingerprint); .getFingerprintTrust(fingerprint);
if (trust == null) {
return false;
}
return addFingerprintRowWithListeners(keys, account, fingerprint, highlight, trust, true, return addFingerprintRowWithListeners(keys, account, fingerprint, highlight, trust, true,
new CompoundButton.OnCheckedChangeListener() { new CompoundButton.OnCheckedChangeListener() {
@Override @Override