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; }