aboutsummaryrefslogtreecommitdiff
path: root/src/chain.cpp
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2015-11-29 13:03:54 +0100
committerPieter Wuille <[email protected]>2015-11-29 13:06:13 +0100
commit5d5ef3a4cf8e32cdf584811eb5415278f4ba9628 (patch)
treedbb3a38aacfe94fcf662fd4fd61132c5ef0623ca /src/chain.cpp
parentMerge pull request #7106 (diff)
parentDocumentation updates for BIP 130 (diff)
downloaddiscoin-5d5ef3a4cf8e32cdf584811eb5415278f4ba9628.tar.xz
discoin-5d5ef3a4cf8e32cdf584811eb5415278f4ba9628.zip
Merge pull request #7129
49fb8e8 Documentation updates for BIP 130 (Pieter Wuille) 50262d8 Allow block announcements with headers (Suhas Daftuar)
Diffstat (limited to 'src/chain.cpp')
-rw-r--r--src/chain.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/chain.cpp b/src/chain.cpp
index 5b8ce076c..3450ed6c3 100644
--- a/src/chain.cpp
+++ b/src/chain.cpp
@@ -51,6 +51,9 @@ CBlockLocator CChain::GetLocator(const CBlockIndex *pindex) const {
}
const CBlockIndex *CChain::FindFork(const CBlockIndex *pindex) const {
+ if (pindex == NULL) {
+ return NULL;
+ }
if (pindex->nHeight > Height())
pindex = pindex->GetAncestor(Height());
while (pindex && !Contains(pindex))