1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-22 07:42:52 +00:00

Prevent NPE

This commit is contained in:
M66B 2024-12-12 07:40:43 +01:00
parent 371814d1da
commit 0d5aafb1f9

View file

@ -224,7 +224,9 @@ public class EntityCertificate {
List<RDN> rdns = new ArrayList<>();
rdns.addAll(Arrays.asList(name.getRDNs(BCStyle.CN)));
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()) {
ASN1Encodable enc = tv.getValue();
if (enc == null)
@ -236,6 +238,7 @@ public class EntityCertificate {
continue;
result.add(MessageHelper.fromPunyCode(email));
}
}
}
} catch (Throwable ex) {
Log.e(ex);