Skip to content

Commit

Permalink
Add: check for RegisterCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
huanmie committed Jul 19, 2022
1 parent 513c332 commit c254021
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion StateMachine/StateMachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class StateMachine :public Graph<StateType, Operation>
for (auto&& [new_state, op] : paths)
if (op == operation)
{
if (callback_map[new_state](derive, state, new_state))
if (!callback_map.contains(new_state) || callback_map[new_state](derive, state, new_state))
{
state = new_state;
return true;
Expand Down

0 comments on commit c254021

Please sign in to comment.