fix possible npe on connection changed

This commit is contained in:
woodser 2023-07-09 07:09:59 -04:00
parent ff9f0a7204
commit 079944c934

View file

@ -498,7 +498,7 @@ public final class CoreMoneroConnectionsService {
daemon = null; daemon = null;
connectionList.setCurrentConnectionUri(null); connectionList.setCurrentConnectionUri(null);
} else { } else {
daemon = new MoneroDaemonRpc(connectionManager.getConnection()); daemon = new MoneroDaemonRpc(currentConnection);
connectionList.removeConnection(currentConnection.getUri()); connectionList.removeConnection(currentConnection.getUri());
connectionList.addConnection(currentConnection); connectionList.addConnection(currentConnection);
connectionList.setCurrentConnectionUri(currentConnection.getUri()); connectionList.setCurrentConnectionUri(currentConnection.getUri());