Skip to content

Commit

Permalink
Don't allow returning to playing mode until the replay finishes (#2508)
Browse files Browse the repository at this point in the history
This fixes an assertion failure I got while trying to reproduce #2508, and
is the fix @gfgtdf recommended.

Note that #2508 is a different bug (an unhandled exception rather than an
assertion failure) and this commit doesn't fix it.
  • Loading branch information
jyrkive committed Feb 19, 2018
1 parent a3b513e commit dfbfd92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hotkey/hotkey_handler_sp.cpp
Expand Up @@ -294,7 +294,7 @@ bool playsingle_controller::hotkey_handler::can_execute_command(const hotkey::ho
case hotkey::HOTKEY_REPLAY_RESET:
return playsingle_controller_.get_replay_controller() && playsingle_controller_.get_replay_controller()->can_execute_command(cmd, index);
case hotkey::HOTKEY_REPLAY_EXIT:
return playsingle_controller_.is_replay();
return playsingle_controller_.is_replay() && (!playsingle_controller_.is_networked_mp() || resources::recorder->at_end());
default: return play_controller::hotkey_handler::can_execute_command(cmd, index);
}
return res;
Expand Down

0 comments on commit dfbfd92

Please sign in to comment.