null check otr fingerprint before display

This commit is contained in:
Daniel Gultsch 2015-07-11 21:23:58 +02:00
parent c4876fab1b
commit 5dd83a5fe6

View File

@ -91,7 +91,9 @@ public final class CryptoHelper {
} }
public static String prettifyFingerprint(String fingerprint) { public static String prettifyFingerprint(String fingerprint) {
if (fingerprint.length() < 40) { if (fingerprint==null) {
return "";
} else if (fingerprint.length() < 40) {
return fingerprint; return fingerprint;
} }
StringBuilder builder = new StringBuilder(fingerprint); StringBuilder builder = new StringBuilder(fingerprint);