aboutsummaryrefslogtreecommitdiff
path: root/src/miner.cpp
diff options
context:
space:
mode:
authorMeshCollider <dobsonsa68@gmail.com>2017-08-23 19:47:56 +1200
committerMeshCollider <dobsonsa68@gmail.com>2017-08-23 19:47:56 +1200
commitc0019924406e1ce8368465c768de11019ad5eeed (patch)
tree3942cecb72ede011b95aa2bba57ab76e10da520c /src/miner.cpp
parent3e55f13bfc98a6b832697d1d0cfb942dbe2094db (diff)
Fix potential null dereferences
Diffstat (limited to 'src/miner.cpp')
-rw-r--r--src/miner.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/miner.cpp b/src/miner.cpp
index f1942ec570..249ea172a6 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -145,6 +145,7 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
LOCK2(cs_main, mempool.cs);
CBlockIndex* pindexPrev = chainActive.Tip();
+ assert(pindexPrev != nullptr);
nHeight = pindexPrev->nHeight + 1;
pblock->nVersion = ComputeBlockVersion(pindexPrev, chainparams.GetConsensus());