diff options
| author | Wladimir J. van der Laan <[email protected]> | 2014-04-07 07:08:02 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-04-07 07:08:09 +0200 |
| commit | ef76f3d62c83b8149cdbb95d93daf99fc1adb1e4 (patch) | |
| tree | 52cf40621dfaaf2990e17bd55b4e704dfc4b4826 /src/main.cpp | |
| parent | Merge pull request #4005 from Telepatheic/patch-1 (diff) | |
| parent | Move assert(pindexNew); to above where we dereference pindexNew. (diff) | |
| download | discoin-ef76f3d62c83b8149cdbb95d93daf99fc1adb1e4.tar.xz discoin-ef76f3d62c83b8149cdbb95d93daf99fc1adb1e4.zip | |
Merge pull request #4010
94c8bfb Move assert(pindexNew); to above where we dereference pindexNew. (Gregory Maxwell)
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 45f4935e4..c4d619485 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); |