1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-21 23:32:51 +00:00

Prevent NPE

This commit is contained in:
M66B 2024-11-29 16:36:12 +01:00
parent a8394d2d50
commit fc40808cb8

View file

@ -4116,10 +4116,13 @@ public class FragmentMessages extends FragmentBase
long last = new Date().getTime() - MAX_FORWARD_ADDRESS_AGE;
List<String> fwds = db.message().getForwardAddresses(message.account, last);
if (fwds != null)
for (String fwd : fwds)
for (Address address : DB.Converters.decodeAddresses(fwd))
if (address instanceof InternetAddress)
result.forwarded.add((InternetAddress) address);
for (String fwd : fwds) {
Address[] afwds = DB.Converters.decodeAddresses(fwd);
if (afwds != null)
for (Address address : afwds)
if (address instanceof InternetAddress)
result.forwarded.add((InternetAddress) address);
}
}
return result;