diff --git a/src/init.cpp b/src/init.cpp index ebd9dee7..59bf32ec 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -100,7 +100,8 @@ void Shutdown() StopNode(); { LOCK(cs_main); - pwalletMain->SetBestChain(CBlockLocator(pindexBest)); + if (pwalletMain) + pwalletMain->SetBestChain(CBlockLocator(pindexBest)); if (pblocktree) pblocktree->Flush(); if (pcoinsTip)