From ef9a13b5572ae8a9510ed86958a4b6843b4302e1 Mon Sep 17 00:00:00 2001 From: miketout Date: Fri, 5 Oct 2018 21:44:24 -0700 Subject: [PATCH] Additional null check --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index e08787d56..c3febbb20 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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);