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.
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) {