Skip to content

Commit

Permalink
fixup 'fix game freezes on droiding when using dsu #3453'
Browse files Browse the repository at this point in the history
fixes #3486

(cherry-picked from commit 08bb6a4)
  • Loading branch information
gfgtdf authored and sevu committed Oct 7, 2018
1 parent 9cc105f commit 3c81435
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/actions/undo.cpp
Expand Up @@ -389,7 +389,7 @@ void undo_list::undo()
resources::recorder->redo(replay_data);
undos_.emplace_back(std::move(action));
}
if(std::all_of(undos_.begin(), undos_.begin(), [](const action_ptr_t& action){ return dynamic_cast<undo_action*>(action.get()) == nullptr; }))
if(std::all_of(undos_.begin(), undos_.end(), [](const action_ptr_t& action){ return dynamic_cast<undo_action*>(action.get()) == nullptr; }))
{
//clear the undo stack if it only contains dsu related actions, this in particular makes sure loops like `while(can_undo()) { undo(); }`always stop.
undos_.clear();
Expand Down

0 comments on commit 3c81435

Please sign in to comment.