fix NPE when writing Resolver.Result to disk

This commit is contained in:
Daniel Gultsch 2018-01-22 23:20:58 +01:00
parent 74048593ff
commit e62b0ca320
1 changed files with 1 additions and 1 deletions

View File

@ -311,7 +311,7 @@ public class Resolver {
public ContentValues toContentValues() { public ContentValues toContentValues() {
final ContentValues contentValues = new ContentValues(); 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(HOSTNAME, hostname.toString());
contentValues.put(PORT, port); contentValues.put(PORT, port);
contentValues.put(PRIORITY, priority); contentValues.put(PRIORITY, priority);