From 079944c9347bdac2901054a1a64c1c3d04681bee Mon Sep 17 00:00:00 2001 From: woodser Date: Sun, 9 Jul 2023 07:09:59 -0400 Subject: [PATCH] fix possible npe on connection changed --- .../main/java/haveno/core/api/CoreMoneroConnectionsService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/haveno/core/api/CoreMoneroConnectionsService.java b/core/src/main/java/haveno/core/api/CoreMoneroConnectionsService.java index 1b6401bf32..f5132f73d8 100644 --- a/core/src/main/java/haveno/core/api/CoreMoneroConnectionsService.java +++ b/core/src/main/java/haveno/core/api/CoreMoneroConnectionsService.java @@ -498,7 +498,7 @@ public final class CoreMoneroConnectionsService { daemon = null; connectionList.setCurrentConnectionUri(null); } else { - daemon = new MoneroDaemonRpc(connectionManager.getConnection()); + daemon = new MoneroDaemonRpc(currentConnection); connectionList.removeConnection(currentConnection.getUri()); connectionList.addConnection(currentConnection); connectionList.setCurrentConnectionUri(currentConnection.getUri());