1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-02 13:14:39 +00:00

Prevent NPE

This commit is contained in:
M66B 2024-07-07 19:57:43 +02:00
parent 718bcc4b1b
commit eafa031c0b

View file

@ -698,6 +698,8 @@ public class DnsHelper {
@Override
public DnsQueryResult query(DnsMessage message, InetAddress address, int port) throws IOException {
DnsQueryResult result = delegate.query(message, address, port);
if (result == null)
throw new UnknownHostException();
DnsMessage answer = new DnsMessage(result.response.toArray())
.asBuilder()
.setRecursionAvailable(true)