diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp index f096403930..721d3ae343 100644 --- a/src/qt/walletview.cpp +++ b/src/qt/walletview.cpp @@ -153,14 +153,20 @@ void WalletView::setClientModel(ClientModel *_clientModel) { this->clientModel = _clientModel; - overviewPage->setClientModel(_clientModel); - sendCoinsPage->setClientModel(_clientModel); - coinJoinCoinsPage->setClientModel(_clientModel); + if (overviewPage != nullptr) { + overviewPage->setClientModel(_clientModel); + } + if (sendCoinsPage != nullptr) { + sendCoinsPage->setClientModel(_clientModel); + } + if (coinJoinCoinsPage != nullptr) { + coinJoinCoinsPage->setClientModel(_clientModel); + } QSettings settings; - if (settings.value("fShowMasternodesTab").toBool()) { + if (settings.value("fShowMasternodesTab").toBool() && masternodeListPage != nullptr) { masternodeListPage->setClientModel(_clientModel); } - if (settings.value("fShowGovernanceTab").toBool()) { + if (settings.value("fShowGovernanceTab").toBool() && governanceListPage != nullptr) { governanceListPage->setClientModel(_clientModel); } }