From 47ab151ed552a2095c4aa75a767fb0670534c995 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Mon, 17 Oct 2022 02:31:07 +0300 Subject: [PATCH] fix(gui): Fix crashes when trying to run `dash-qt` with `--disablewallet` (#5041) * fix(gui): Fix crashes when trying to run `dash-qt` with `--disablewallet` * use enableWallet --- src/qt/bitcoingui.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index b0c8c49b06..468f0ad968 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -1339,8 +1339,10 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, const QStri // Disabling macOS App Nap on initial sync, disk, reindex operations and mixing. bool disableAppNap = !m_node.masternodeSync().isSynced(); #ifdef ENABLE_WALLET - for (const auto& wallet : m_node.walletClient().getWallets()) { - disableAppNap |= wallet->coinJoin().isMixing(); + if (enableWallet) { + for (const auto& wallet : m_node.walletClient().getWallets()) { + disableAppNap |= wallet->coinJoin().isMixing(); + } } #endif // ENABLE_WALLET if (disableAppNap) {