[BUGFIX] happy eye: null pointer on closed socket if no connection was etablished

This commit is contained in:
genofire 2020-02-08 08:54:19 +01:00
parent 3c42a9a80f
commit 91353ad4ae
No known key found for this signature in database
GPG Key ID: 9D7D3C6BFF600C6A
1 changed files with 4 additions and 1 deletions

View File

@ -428,7 +428,10 @@ public class Resolver {
@Override @Override
public Result call() throws Exception { public Result call() throws Exception {
this.connect(); this.connect();
return this.socket.isConnected() ? this : null; if (this.socket != null && this.socket.isConnected()) {
return this ;
}
return null;
} }
public ContentValues toContentValues() { public ContentValues toContentValues() {