From 70d39454ee4d8fa69110476f0aa7081972559b3a Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 1 May 2017 11:51:06 -0400 Subject: [PATCH] Fix potential NPD introduced in b297426c See https://github.com/bitcoin/bitcoin/pull/10290#discussion_r113954232 for more info. --- src/validation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validation.cpp b/src/validation.cpp index 8613241d6..1030fe1b1 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; }