Defensively check for a null pindex in `FindFork`
This commit is contained in:
parent
72fc17ffc7
commit
0b02d66bba
|
@ -49,6 +49,7 @@ CBlockLocator CChain::GetLocator(const CBlockIndex *pindex) const {
|
|||
}
|
||||
|
||||
const CBlockIndex *CChain::FindFork(const CBlockIndex *pindex) const {
|
||||
assert(pindex != nullptr);
|
||||
if (pindex->nHeight > Height())
|
||||
pindex = pindex->GetAncestor(Height());
|
||||
while (pindex && !Contains(pindex))
|
||||
|
|
Loading…
Reference in New Issue