From 35570cb4a6018994bc8a6881e4230594eb146a08 Mon Sep 17 00:00:00 2001 From: "Nelson R. Perez" Date: Fri, 21 Sep 2018 13:29:47 -0500 Subject: [PATCH] Fixing a potential NullPointerException at the NetworkService --- .../java/cy/agorise/graphenej/api/android/NetworkService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/graphenej/src/main/java/cy/agorise/graphenej/api/android/NetworkService.java b/graphenej/src/main/java/cy/agorise/graphenej/api/android/NetworkService.java index 244903e..f8b8c65 100644 --- a/graphenej/src/main/java/cy/agorise/graphenej/api/android/NetworkService.java +++ b/graphenej/src/main/java/cy/agorise/graphenej/api/android/NetworkService.java @@ -215,7 +215,8 @@ public class NetworkService extends Service { if(mWebSocket != null) mWebSocket.close(NORMAL_CLOSURE_STATUS, null); - nodeLatencyVerifier.stop(); + if(nodeLatencyVerifier != null) + nodeLatencyVerifier.stop(); } @Nullable