From 3d18291b6ef0df2f693efb872bc9bfddec9a864a Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sat, 27 Jan 2018 21:36:02 +0100 Subject: fix NPE when writing Resolver.Result to disk --- src/main/java/de/pixart/messenger/utils/Resolver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/de') diff --git a/src/main/java/de/pixart/messenger/utils/Resolver.java b/src/main/java/de/pixart/messenger/utils/Resolver.java index e4a612f5f..32ed1e7c7 100644 --- a/src/main/java/de/pixart/messenger/utils/Resolver.java +++ b/src/main/java/de/pixart/messenger/utils/Resolver.java @@ -311,7 +311,7 @@ public class Resolver { public ContentValues toContentValues() { final ContentValues contentValues = new ContentValues(); - contentValues.put(IP, ip.getAddress()); + contentValues.put(IP, ip == null ? null : ip.getAddress()); contentValues.put(HOSTNAME, hostname.toString()); contentValues.put(PORT, port); contentValues.put(PRIORITY, priority); -- cgit v1.2.3