From bdcf8a21820bc84a81b1f4824aed48dc5051e905 Mon Sep 17 00:00:00 2001 From: woodser Date: Tue, 23 Jul 2024 08:03:36 -0400 Subject: [PATCH] fix npe force closing wallet on startup --- .../java/haveno/core/xmr/wallet/XmrWalletService.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java b/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java index 2e609d77..1206b037 100644 --- a/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java +++ b/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java @@ -1758,9 +1758,11 @@ public class XmrWalletService { private void forceCloseMainWallet() { stopPolling(); - isClosingWallet = true; - forceCloseWallet(wallet, getWalletPath(MONERO_WALLET_NAME)); - wallet = null; + if (wallet != null) { + isClosingWallet = true; + forceCloseWallet(wallet, getWalletPath(MONERO_WALLET_NAME)); + wallet = null; + } } private void forceRestartMainWallet() {