Additional null check

This commit is contained in:
miketout
2018-10-05 21:44:24 -07:00
parent a6ac51616c
commit ef9a13b557

View File

@@ -4127,7 +4127,7 @@ bool ReconsiderBlock(CValidationState& state, CBlockIndex *pindex) {
// Remove the invalidity flag from this block and all its descendants.
BlockMap::iterator it = mapBlockIndex.begin();
while (it != mapBlockIndex.end()) {
while (it != mapBlockIndex.end() && it->second != 0) {
if (!it->second->IsValid() && it->second->GetAncestor(nHeight) == pindex) {
it->second->nStatus &= ~BLOCK_FAILED_MASK;
setDirtyBlockIndex.insert(it->second);