diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 75bc98320..313f3310e 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -525,6 +525,7 @@ UniValue getblocktemplate(const JSONRPCRequest& request) // Need to update only after we know CreateNewBlock succeeded pindexPrev = pindexPrevNew; } + assert(pindexPrev); CBlock* pblock = &pblocktemplate->block; // pointer for convenience const Consensus::Params& consensusParams = Params().GetConsensus();