mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-03 13:44:40 +00:00
Prevent NPE
This commit is contained in:
parent
371814d1da
commit
0d5aafb1f9
1 changed files with 4 additions and 1 deletions
|
@ -224,7 +224,9 @@ public class EntityCertificate {
|
||||||
List<RDN> rdns = new ArrayList<>();
|
List<RDN> rdns = new ArrayList<>();
|
||||||
rdns.addAll(Arrays.asList(name.getRDNs(BCStyle.CN)));
|
rdns.addAll(Arrays.asList(name.getRDNs(BCStyle.CN)));
|
||||||
rdns.addAll(Arrays.asList(name.getRDNs(BCStyle.EmailAddress)));
|
rdns.addAll(Arrays.asList(name.getRDNs(BCStyle.EmailAddress)));
|
||||||
for (RDN rdn : rdns)
|
for (RDN rdn : rdns) {
|
||||||
|
if (rdn == null)
|
||||||
|
continue;
|
||||||
for (AttributeTypeAndValue tv : rdn.getTypesAndValues()) {
|
for (AttributeTypeAndValue tv : rdn.getTypesAndValues()) {
|
||||||
ASN1Encodable enc = tv.getValue();
|
ASN1Encodable enc = tv.getValue();
|
||||||
if (enc == null)
|
if (enc == null)
|
||||||
|
@ -237,6 +239,7 @@ public class EntityCertificate {
|
||||||
result.add(MessageHelper.fromPunyCode(email));
|
result.add(MessageHelper.fromPunyCode(email));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
Log.e(ex);
|
Log.e(ex);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue