aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorgenofire <geno+dev@fireorbit.de>2020-02-08 08:54:04 +0100
committergenofire <geno+dev@fireorbit.de>2020-02-08 08:54:04 +0100
commit8efe986962e4bfe3dbb3c1bda40e6a09422d791b (patch)
treeaada3d998ee7f2760edda6f95ffdf46b60aef56f /src
parent4fac8c47e7b7c6f8f57314ca7f3662750b0a28a7 (diff)
[BUGFIX] happy eye: null pointer on closed socket if no connection was etablished
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/utils/Resolver.java5
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() {