diff --git a/src/init.cpp b/src/init.cpp index ebd9dee7b..59bf32eca 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)