Fix segfault when shutting down before fully loading
This was introduced by 3192975f1d
.
It can be triggered easily when canceling DB upgrade from
pre-per-utxo.
This commit is contained in:
parent
138569722c
commit
c0025d0a92
1 changed files with 3 additions and 1 deletions
|
@ -216,7 +216,9 @@ void Shutdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
// FlushStateToDisk generates a SetBestChain callback, which we should avoid missing
|
// 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
|
// After there are no more peers/RPC left to give us new data which may generate
|
||||||
// CValidationInterface callbacks, flush them...
|
// CValidationInterface callbacks, flush them...
|
||||||
|
|
Loading…
Reference in a new issue