Skip to content

Commit

Permalink
don't execute run_in_synced_context in replays.
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Jun 10, 2014
1 parent 2b7da8f commit 1eee975
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/synced_context.cpp
Expand Up @@ -36,6 +36,14 @@ bool synced_context::is_simultaneously_ = false;
bool synced_context::run_in_synced_context(const std::string& commandname, const config& data, bool use_undo, bool show, bool store_in_replay, synced_command::error_handler_function error_handler)
{
DBG_REPLAY << "run_in_synced_context:" << commandname << "\n";

if(!recorder.at_end())
{
//Most likeley we are in a replay now.
WRN_REPLAY << "invalid run_in_synced_context call ignored" << std::endl;
return false;
}

assert(use_undo || (!resources::undo_stack->can_redo() && !resources::undo_stack->can_undo()));
if(store_in_replay)
{
Expand Down

0 comments on commit 1eee975

Please sign in to comment.