From 9e1393bc1c8903d400e559b3528a0fe5d04bd389 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 11 Oct 2015 14:27:09 +0200 Subject: prevent null pointer when trying to display device fingerprints of not existing sessions --- src/main/java/eu/siacs/conversations/ui/XmppActivity.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java index e3848fe2..94292f7e 100644 --- a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java @@ -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 -- cgit v1.2.3