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
This commit is contained in:
UdjinM6 2022-10-17 02:31:07 +03:00 committed by pasta
parent 0b162ff599
commit 47ab151ed5
No known key found for this signature in database
GPG Key ID: 52527BEDABE87984

View File

@ -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. // Disabling macOS App Nap on initial sync, disk, reindex operations and mixing.
bool disableAppNap = !m_node.masternodeSync().isSynced(); bool disableAppNap = !m_node.masternodeSync().isSynced();
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
for (const auto& wallet : m_node.walletClient().getWallets()) { if (enableWallet) {
disableAppNap |= wallet->coinJoin().isMixing(); for (const auto& wallet : m_node.walletClient().getWallets()) {
disableAppNap |= wallet->coinJoin().isMixing();
}
} }
#endif // ENABLE_WALLET #endif // ENABLE_WALLET
if (disableAppNap) { if (disableAppNap) {