more null checks for otr fingerprints
This commit is contained in:
parent
40335785aa
commit
ce4848f742
|
@ -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));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue