fix 2 crashes
This commit is contained in:
parent
d39815db32
commit
189e48328d
@ -120,7 +120,7 @@ void StartShutdown()
|
||||
}
|
||||
bool ShutdownRequested()
|
||||
{
|
||||
return fRequestShutdown;
|
||||
return fRequestShutdown || fRestartRequested;
|
||||
}
|
||||
|
||||
class CCoinsViewErrorCatcher : public CCoinsViewBacked
|
||||
@ -149,6 +149,7 @@ static CCoinsViewErrorCatcher *pcoinscatcher = NULL;
|
||||
/** Preparing steps before shutting down or restarting the wallet */
|
||||
void PrepareShutdown()
|
||||
{
|
||||
fRequestShutdown = true; // Needed when we shutdown the wallet
|
||||
fRestartRequested = true; // Needed when we restart the wallet
|
||||
LogPrintf("%s: In progress...\n", __func__);
|
||||
static CCriticalSection cs_Shutdown;
|
||||
|
@ -191,6 +191,8 @@ uint256 CMasternode::CalculateScore(int mod, int64_t nBlockHeight)
|
||||
|
||||
void CMasternode::Check()
|
||||
{
|
||||
if(ShutdownRequested()) return;
|
||||
|
||||
//TODO: Random segfault with this line removed
|
||||
TRY_LOCK(cs_main, lockRecv);
|
||||
if(!lockRecv) return;
|
||||
|
@ -306,7 +306,9 @@ void OverviewPage::showOutOfSyncWarning(bool fShow)
|
||||
|
||||
void OverviewPage::updateDarksendProgress()
|
||||
{
|
||||
if(IsInitialBlockDownload()) return;
|
||||
if(IsInitialBlockDownload() || ShutdownRequested()) return;
|
||||
|
||||
if(!pwalletMain || !walletModel || !walletModel->getOptionsModel()) return;
|
||||
|
||||
int64_t nBalance = pwalletMain->GetBalance();
|
||||
QString strAmountAndRounds;
|
||||
|
Loading…
Reference in New Issue
Block a user