[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [orbot/master] handle NPE since node is not yet set



commit 73b0b0d7f2f91e6cc0e16d7f422bb6a0a4291df8
Author: n8fr8 <nathan@xxxxxxxxxxxxxxxxxxxx>
Date:   Wed Feb 5 23:00:31 2020 -0500

    handle NPE since node is not yet set
---
 .../src/main/java/org/torproject/android/service/TorEventHandler.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/orbotservice/src/main/java/org/torproject/android/service/TorEventHandler.java b/orbotservice/src/main/java/org/torproject/android/service/TorEventHandler.java
index def94fcf..e8de7024 100644
--- a/orbotservice/src/main/java/org/torproject/android/service/TorEventHandler.java
+++ b/orbotservice/src/main/java/org/torproject/android/service/TorEventHandler.java
@@ -6,6 +6,7 @@ import net.freehaven.tor.control.EventHandler;
 
 import org.torproject.android.service.util.ExternalIPFetcher;
 import org.torproject.android.service.util.Prefs;
+import org.w3c.dom.Text;
 
 import java.text.NumberFormat;
 import java.util.HashMap;
@@ -178,7 +179,7 @@ public class TorEventHandler implements EventHandler, TorServiceConstants {
 
                 if (nodeParts.length == 1) {
                     nodeId = nodeParts[0].substring(1);
-                    nodeName = node.id;
+                    nodeName = nodeId;
                 } else if (nodeParts.length == 2) {
                     nodeId = nodeParts[0].substring(1);
                     nodeName = nodeParts[1];



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits