Skip to content

Commit

Permalink
Fix raft.h empty list deref
Browse files Browse the repository at this point in the history
  • Loading branch information
maxtropets committed Jan 15, 2025
1 parent a2c0ea1 commit f4caefc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/consensus/aft/raft.h
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ namespace aft
become_retired(idx, ccf::kv::RetirementPhase::Ordered);
}

if (conf != configurations.back().nodes)
if (configurations.empty() || conf != configurations.back().nodes)
{
Configuration new_config = {idx, std::move(conf), idx};
configurations.push_back(new_config);
Expand Down

0 comments on commit f4caefc

Please sign in to comment.