diff --git a/src/validation.cpp b/src/validation.cpp index a3ed30ab82..ffd5283551 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2965,7 +2965,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; }