Ensure that we don't pass a null block pointer to ConnectTip.
This commit is contained in:
parent
db65d92df4
commit
368a7c5a9d
|
@ -3426,7 +3426,7 @@ static bool ActivateBestChainStep(CValidationState& state, const CChainParams& c
|
||||||
BOOST_REVERSE_FOREACH(CBlockIndex *pindexConnect, vpindexToConnect) {
|
BOOST_REVERSE_FOREACH(CBlockIndex *pindexConnect, vpindexToConnect) {
|
||||||
const CBlock* pconnectBlock;
|
const CBlock* pconnectBlock;
|
||||||
CBlock block;
|
CBlock block;
|
||||||
if (pindexConnect == pindexMostWork) {
|
if (pblock && pindexConnect == pindexMostWork) {
|
||||||
pconnectBlock = pblock;
|
pconnectBlock = pblock;
|
||||||
} else {
|
} else {
|
||||||
// read the block to be connected from disk
|
// read the block to be connected from disk
|
||||||
|
|
Loading…
Reference in New Issue