From da8474a0f4b4983057cc94a2fbd8ded0190fced4 Mon Sep 17 00:00:00 2001 From: woodser Date: Mon, 4 Dec 2023 09:17:43 -0500 Subject: [PATCH] fix npe when connection is null --- core/src/main/java/haveno/core/api/XmrConnectionService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/java/haveno/core/api/XmrConnectionService.java b/core/src/main/java/haveno/core/api/XmrConnectionService.java index 161d63cea9..ae68474556 100644 --- a/core/src/main/java/haveno/core/api/XmrConnectionService.java +++ b/core/src/main/java/haveno/core/api/XmrConnectionService.java @@ -330,6 +330,7 @@ public final class XmrConnectionService { } private boolean useTorProxy(MoneroRpcConnection connection) { + if (connection == null) return false; return connection.isOnion() || (preferences.getUseTorForXmr().isUseTorForXmr() && !HavenoUtils.isLocalHost(connection.getUri())); }