Avoid referencing uninitialized memory
This commit is contained in:
parent
0532661937
commit
cb3c23a17b
1 changed files with 1 additions and 1 deletions
|
|
@ -429,7 +429,7 @@ namespace detail {
|
|||
if( num > 0 )
|
||||
result.push_back(_chain_db->get_block_id_for_num(num));
|
||||
|
||||
if( block_header::num_from_id(result.back()) < _chain_db->head_block_num() )
|
||||
if( !result.empty() && block_header::num_from_id(result.back()) < _chain_db->head_block_num() )
|
||||
remaining_item_count = _chain_db->head_block_num() - block_header::num_from_id(result.back());
|
||||
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Reference in a new issue