fix game crashing on 'reset replay'

fixes #3439
This commit is contained in:
gfgtdf 2018-08-06 14:23:34 +02:00
parent b1ec52cab8
commit 7bf37a1e64

View file

@ -671,7 +671,7 @@ void playsingle_controller::reset_replay()
void playsingle_controller::enable_replay(bool is_unit_test)
{
replay_.reset(new replay_controller(*this, gamestate().has_human_sides(), std::shared_ptr<config>( new config(saved_game_.replay_start())), std::bind(&playsingle_controller::on_replay_end, this, is_unit_test)));
replay_.reset(new replay_controller(*this, gamestate().has_human_sides(), std::shared_ptr<config>( new config(saved_game_.get_replay_starting_point())), std::bind(&playsingle_controller::on_replay_end, this, is_unit_test)));
if(is_unit_test) {
replay_->play_replay();
}