aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-07-11 21:23:58 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-07-11 21:23:58 +0200
commit5dd83a5fe685dd3268986ca0a73f21c4dcbc6af5 (patch)
tree8dcd23c600b5a8f117016a0adda4121cb058033a /src
parentc4876fab1b2adcbc6c107695d5b48ebe555c93a5 (diff)
null check otr fingerprint before display
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/utils/CryptoHelper.java4
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);