diff --git a/src/chain.cpp b/src/chain.cpp index 5b8ce076c..9cd13d997 100644 --- a/src/chain.cpp +++ b/src/chain.cpp @@ -51,6 +51,8 @@ CBlockLocator CChain::GetLocator(const CBlockIndex *pindex) const { } const CBlockIndex *CChain::FindFork(const CBlockIndex *pindex) const { + if ( pindex == 0 ) + return(0); if (pindex->nHeight > Height()) pindex = pindex->GetAncestor(Height()); while (pindex && !Contains(pindex))