diff options
author | genofire <geno+dev@fireorbit.de> | 2020-02-08 08:54:04 +0100 |
---|---|---|
committer | genofire <geno+dev@fireorbit.de> | 2020-02-08 08:54:04 +0100 |
commit | 8efe986962e4bfe3dbb3c1bda40e6a09422d791b (patch) | |
tree | aada3d998ee7f2760edda6f95ffdf46b60aef56f /src/main/java/de/pixart | |
parent | 4fac8c47e7b7c6f8f57314ca7f3662750b0a28a7 (diff) |
[BUGFIX] happy eye: null pointer on closed socket if no connection was etablished
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r-- | src/main/java/de/pixart/messenger/utils/Resolver.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/utils/Resolver.java b/src/main/java/de/pixart/messenger/utils/Resolver.java index bf66b38e1..0037e9563 100644 --- a/src/main/java/de/pixart/messenger/utils/Resolver.java +++ b/src/main/java/de/pixart/messenger/utils/Resolver.java @@ -429,7 +429,10 @@ public class Resolver { @Override public Result call() throws Exception { this.connect(); - return this.socket.isConnected() ? this : null; + if (this.socket != null && this.socket.isConnected()) { + return this; + } + return null; } public ContentValues toContentValues() { |