mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 19:23:26 -03:00
Fix crash-at-shutdown if exiting before initializing wallet
This commit is contained in:
parent
8ab6d0a568
commit
dbc6dea1b2
1 changed files with 2 additions and 1 deletions
|
@ -100,7 +100,8 @@ void Shutdown()
|
||||||
StopNode();
|
StopNode();
|
||||||
{
|
{
|
||||||
LOCK(cs_main);
|
LOCK(cs_main);
|
||||||
pwalletMain->SetBestChain(CBlockLocator(pindexBest));
|
if (pwalletMain)
|
||||||
|
pwalletMain->SetBestChain(CBlockLocator(pindexBest));
|
||||||
if (pblocktree)
|
if (pblocktree)
|
||||||
pblocktree->Flush();
|
pblocktree->Flush();
|
||||||
if (pcoinsTip)
|
if (pcoinsTip)
|
||||||
|
|
Loading…
Add table
Reference in a new issue