diff --git a/src/validation.cpp b/src/validation.cpp index 26c676a72..1f0ceba70 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2086,7 +2086,7 @@ bool static FlushStateToDisk(const CChainParams& chainparams, CValidationState & nLastWrite = nNow; } // Flush best chain related state. This can only be done if the blocks / block index write was also done. - if (fDoFullFlush) { + if (fDoFullFlush && !pcoinsTip->GetBestBlock().IsNull()) { // Typical Coin structures on disk are around 48 bytes in size. // Pushing a new one to the database can cause it to be written // twice (once in the log, and once in the tables). This is already