wb: don't clear undo stack when dsu is active
since that might lead to assertion failures&oos later, fixes #3029
This commit is contained in:
parent
5c278a3936
commit
5884aa27ea
1 changed files with 7 additions and 2 deletions
|
@ -38,6 +38,7 @@
|
|||
#include "display.hpp"
|
||||
#include "game_end_exceptions.hpp"
|
||||
#include "game_state.hpp"
|
||||
#include "play_controller.hpp"
|
||||
#include "resources.hpp"
|
||||
#include "units/unit.hpp"
|
||||
#include "utils/iterable_pair.hpp"
|
||||
|
@ -355,8 +356,12 @@ bool side_actions::execute(side_actions::iterator position)
|
|||
}
|
||||
|
||||
if(resources::whiteboard->should_clear_undo()) {
|
||||
//FIXME: clearing the undo stack in a unsynced context can casue oos/assertion failures.
|
||||
resources::undo_stack->clear();
|
||||
if(resources::controller->current_team().auto_shroud_updates()) {
|
||||
resources::undo_stack->clear();
|
||||
}
|
||||
else {
|
||||
WRN_WB << "not clearing undo stack because dsu is active\n";
|
||||
}
|
||||
}
|
||||
|
||||
std::stringstream ss;
|
||||
|
|
Loading…
Add table
Reference in a new issue