Skip to content

Commit

Permalink
GH-1052 Verify root exists before accessing id()
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Dec 6, 2024
1 parent 838e885 commit ee1c477
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/chain/fork_database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ namespace eosio::chain {
template<class BSP>
BSP fork_database_impl<BSP>::get_block_impl(const block_id_type& id,
include_root_t include_root /* = include_root_t::no */) const {
if( include_root == include_root_t::yes && root->id() == id ) {
if( include_root == include_root_t::yes && root && root->id() == id ) {
return root;
}
auto itr = index.find( id );
Expand Down

0 comments on commit ee1c477

Please sign in to comment.