Ensure that we don't pass a null block pointer to ConnectTip.

This commit is contained in:
Kris Nuttycombe 2020-04-22 12:28:13 -06:00
parent db65d92df4
commit 368a7c5a9d
1 changed files with 1 additions and 1 deletions

View File

@ -3426,7 +3426,7 @@ static bool ActivateBestChainStep(CValidationState& state, const CChainParams& c
BOOST_REVERSE_FOREACH(CBlockIndex *pindexConnect, vpindexToConnect) {
const CBlock* pconnectBlock;
CBlock block;
if (pindexConnect == pindexMostWork) {
if (pblock && pindexConnect == pindexMostWork) {
pconnectBlock = pblock;
} else {
// read the block to be connected from disk