Skip to content

Commit

Permalink
Fix crash when calculating block trust on genesis block.
Browse files Browse the repository at this point in the history
  • Loading branch information
denravonska authored Feb 1, 2018
1 parent 48b985d commit 033bb00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3628,7 +3628,7 @@ bool ReorganizeChain(CTxDB& txdb, unsigned &cnt_dis, unsigned &cnt_con, CBlock &
return error("ReorganizeChain: TxnCommit failed");

// Add to current best branch
if(pindex->pprev)
if(pindex->pprev && pindexBest && pindexBest->pprev)
{
assert( !pindex->pprev->pnext );
pindex->pprev->pnext = pindex;
Expand Down

0 comments on commit 033bb00

Please sign in to comment.