more null checks for otr fingerprints

This commit is contained in:
iNPUTmice 2014-12-20 16:01:28 +01:00
parent 40335785aa
commit ce4848f742

View File

@ -271,7 +271,7 @@ public class Contact implements ListItem {
if (this.keys.has("otr_fingerprints")) { if (this.keys.has("otr_fingerprints")) {
final JSONArray prints = this.keys.getJSONArray("otr_fingerprints"); final JSONArray prints = this.keys.getJSONArray("otr_fingerprints");
for (int i = 0; i < prints.length(); ++i) { 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()) { if (print != null && !print.isEmpty()) {
fingerprints.add(prints.getString(i)); fingerprints.add(prints.getString(i));
} }