File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed
Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -443,12 +443,13 @@ void TopBar::setStakingStatusActive(bool fActive)
443443}
444444void TopBar::updateStakingStatus ()
445445{
446- setStakingStatusActive (walletModel &&
447- !walletModel->isWalletLocked () &&
448- walletModel->isStakingStatusActive ());
446+ if (walletModel && !walletModel-> isShutdownRequested ()) {
447+ setStakingStatusActive ( !walletModel->isWalletLocked () &&
448+ walletModel->isStakingStatusActive ());
449449
450- // Taking advantage of this timer to update Tor status if needed.
451- updateTorIcon ();
450+ // Taking advantage of this timer to update Tor status if needed.
451+ updateTorIcon ();
452+ }
452453}
453454
454455void TopBar::setNumConnections (int count)
Original file line number Diff line number Diff line change 1111#include " optionsmodel.h"
1212#include " recentrequeststablemodel.h"
1313#include " transactiontablemodel.h"
14+ #include " init.h" // for ShutdownRequested(). Future: move to an interface wrapper
1415
1516#include " base58.h"
1617#include " coincontrol.h"
@@ -67,6 +68,11 @@ bool WalletModel::isRegTestNetwork() const
6768 return Params ().IsRegTestNet ();
6869}
6970
71+ bool WalletModel::isShutdownRequested ()
72+ {
73+ return ShutdownRequested ();
74+ }
75+
7076bool WalletModel::isColdStakingNetworkelyEnabled () const
7177{
7278 return !sporkManager.IsSporkActive (SPORK_19_COLDSTAKING_MAINTENANCE);
Original file line number Diff line number Diff line change @@ -151,6 +151,7 @@ class WalletModel : public QObject
151151
152152 bool isTestNetwork () const ;
153153 bool isRegTestNetwork () const ;
154+ bool isShutdownRequested ();
154155 /* * Whether cold staking is enabled or disabled in the network **/
155156 bool isColdStakingNetworkelyEnabled () const ;
156157 bool isSaplingInMaintenance () const ;
You can’t perform that action at this time.
0 commit comments