mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
fix(qt): fix crash when first enabling governance tab due to null-ptr deref (#4795)
Decided to also apply the same logic to the other items so that we don't do nullptr dereferences replication ``` ./src/qt/dash-qt --regtest --resetguisettings Enable governance shutdown ```
This commit is contained in:
parent
11a0fd7773
commit
685c122fef
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user