diff --git a/src/init.cpp b/src/init.cpp index 45658e49d..d9b892c65 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -78,8 +78,10 @@ void Shutdown(void* parg) StopNode(); { LOCK(cs_main); - pcoinsTip->Flush(); - pblocktree->Flush(); + if (pcoinsTip) + pcoinsTip->Flush(); + if (pblocktree) + pblocktree->Flush(); delete pcoinsTip; delete pcoinsdbview; delete pblocktree;