aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 5b7379e16e..2ca3ec17ac 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -216,7 +216,9 @@ void Shutdown()
}
// FlushStateToDisk generates a SetBestChain callback, which we should avoid missing
- FlushStateToDisk();
+ if (pcoinsTip != nullptr) {
+ FlushStateToDisk();
+ }
// After there are no more peers/RPC left to give us new data which may generate
// CValidationInterface callbacks, flush them...