Fix crash-at-shutdown if exiting before initializing wallet

This commit is contained in:
Gavin Andresen committed 2013-05-24 15:52:52 -04:00
1 parent 8ab6d0a568
commit dbc6dea1b2
1 file changed
+1
+1
View File
@@ -100,6 +100,7 @@ void Shutdown()
StopNode();
{
LOCK(cs_main);
if (pwalletMain)
pwalletMain->SetBestChain(CBlockLocator(pindexBest));
if (pblocktree)
pblocktree->Flush();