aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2017-05-01 11:51:06 -0400
committerMatt Corallo <git@bluematt.me>2017-05-01 11:51:06 -0400
commit70d39454ee4d8fa69110476f0aa7081972559b3a (patch)
treebab7a625e987a39f335fdc53f553fe8202b07929 /src/validation.cpp
parente2b99b13131b5d0fd6fae6d55892c2ebb327d438 (diff)
Fix potential NPD introduced in b297426c
See https://github.com/bitcoin/bitcoin/pull/10290#discussion_r113954232 for more info.
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index 8613241d68..1030fe1b17 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -2538,7 +2538,7 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams,
}
int nStopAtHeight = GetArg("-stopatheight", DEFAULT_STOPATHEIGHT);
- if (nStopAtHeight && pindexNewTip->nHeight >= nStopAtHeight) StartShutdown();
+ if (nStopAtHeight && pindexNewTip && pindexNewTip->nHeight >= nStopAtHeight) StartShutdown();
return true;
}