Browse Source

Make sure pindexWalk is non-null

pull/4/head
jl777 6 years ago
parent
commit
5298d41fae
  1. 3
      src/chain.cpp

3
src/chain.cpp

@ -81,7 +81,8 @@ CBlockIndex* CBlockIndex::GetAncestor(int height)
CBlockIndex* pindexWalk = this;
int heightWalk = nHeight;
while (heightWalk > height) {
while ( heightWalk > height && pindexWalk != 0 )
{
int heightSkip = GetSkipHeight(heightWalk);
int heightSkipPrev = GetSkipHeight(heightWalk - 1);
if (pindexWalk->pskip != NULL &&

Loading…
Cancel
Save