From 6460b5b19ca18c6298188df4aba9b616a77592f5 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 23 Mar 2017 19:38:59 +0200 Subject: [PATCH] Test --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index b7c48332a..37804da3e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -383,7 +383,7 @@ void UpdateBlockAvailability(NodeId nodeid, const uint256 &hash) { ProcessBlockAvailability(nodeid); BlockMap::iterator it = mapBlockIndex.find(hash); - if (it != mapBlockIndex.end() && it->second->nChainWork > 0) { + if (it != 0 && it != mapBlockIndex.end() && it->second->nChainWork > 0) { // An actually better block was announced. if (state->pindexBestKnownBlock == NULL || it->second->nChainWork >= state->pindexBestKnownBlock->nChainWork) state->pindexBestKnownBlock = it->second;