From ce4848f74225a59ddc8469a2a3e3481519c0f0d5 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Sat, 20 Dec 2014 16:01:28 +0100 Subject: more null checks for otr fingerprints --- src/main/java/eu/siacs/conversations/entities/Contact.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/eu/siacs/conversations/entities/Contact.java b/src/main/java/eu/siacs/conversations/entities/Contact.java index 1fb80b9b..0820504f 100644 --- a/src/main/java/eu/siacs/conversations/entities/Contact.java +++ b/src/main/java/eu/siacs/conversations/entities/Contact.java @@ -271,7 +271,7 @@ public class Contact implements ListItem { if (this.keys.has("otr_fingerprints")) { final JSONArray prints = this.keys.getJSONArray("otr_fingerprints"); for (int i = 0; i < prints.length(); ++i) { - final String print = prints.getString(i); + final String print = prints.isNull(i) ? null : prints.getString(i); if (print != null && !print.isEmpty()) { fingerprints.add(prints.getString(i)); } -- cgit v1.2.3