Prior to this commit there was an implicit assumption that the following code path would always be taken ...
if (pindexPrev != chainActive.Tip() ||
(mempool.GetTransactionsUpdated() != nTransactionsUpdatedLast && GetTime() - nStart > 5))
... otherwise pblock would end up being NULL, and given ...
pblock->nNonce = 0;
... we would have a NULL pointer dereference.
This commit adds an assertion which removes the possibility of a NULL pointer dereference.