aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorCory Fields <[email protected]>2018-02-13 00:24:14 -0500
committerCory Fields <[email protected]>2018-02-13 00:38:25 -0500
commitceaefdd5f362537a1908d0095059e4be788f3dee (patch)
treef54323b3c2a4f9c67b166f889946cd52e0b7c470 /src/validation.cpp
parentMerge #12416: Fix Windows build errors introduced in #10498 (diff)
downloaddiscoin-ceaefdd5f362537a1908d0095059e4be788f3dee.tar.xz
discoin-ceaefdd5f362537a1908d0095059e4be788f3dee.zip
fix possible shutdown assertion with -reindex-shutdown
Credit @eklitzke for reproducing.
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index 371460a6f..dabf7e279 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -2087,7 +2087,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