diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-07-11 21:23:58 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-07-11 21:23:58 +0200 |
commit | 5dd83a5fe685dd3268986ca0a73f21c4dcbc6af5 (patch) | |
tree | 8dcd23c600b5a8f117016a0adda4121cb058033a /src/main | |
parent | c4876fab1b2adcbc6c107695d5b48ebe555c93a5 (diff) |
null check otr fingerprint before display
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/utils/CryptoHelper.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/utils/CryptoHelper.java b/src/main/java/eu/siacs/conversations/utils/CryptoHelper.java index 466bc409..2dec203d 100644 --- a/src/main/java/eu/siacs/conversations/utils/CryptoHelper.java +++ b/src/main/java/eu/siacs/conversations/utils/CryptoHelper.java @@ -91,7 +91,9 @@ public final class CryptoHelper { } public static String prettifyFingerprint(String fingerprint) { - if (fingerprint.length() < 40) { + if (fingerprint==null) { + return ""; + } else if (fingerprint.length() < 40) { return fingerprint; } StringBuilder builder = new StringBuilder(fingerprint); |