aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2014-04-05 22:11:16 -0700
committerGregory Maxwell <greg@xiph.org>2014-04-05 22:11:16 -0700
commit94c8bfb23b4289c74846f4c39704261987d11b1c (patch)
tree52cf40621dfaaf2990e17bd55b4e704dfc4b4826 /src
parent513412fd73af0e62d8780a8de9721b7822ff2c6f (diff)
Move assert(pindexNew); to above where we dereference pindexNew.
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 45f4935e44..c4d6194857 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2133,11 +2133,11 @@ bool AddToBlockIndex(CBlock& block, CValidationState& state, const CDiskBlockPos
// Construct new block index object
CBlockIndex* pindexNew = new CBlockIndex(block);
+ assert(pindexNew);
{
LOCK(cs_nBlockSequenceId);
pindexNew->nSequenceId = nBlockSequenceId++;
}
- assert(pindexNew);
map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.insert(make_pair(hash, pindexNew)).first;
pindexNew->phashBlock = &((*mi).first);
map<uint256, CBlockIndex*>::iterator miPrev = mapBlockIndex.find(block.hashPrevBlock);