mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-10 02:34:14 +00:00
remove segment fault when loading some save game
...and also remove bug with segment fault during creating debug unit
This commit is contained in:
parent
22bd287b5f
commit
4352abd37c
@ -522,7 +522,14 @@ config* replay::get_next_action()
|
||||
void replay::pre_replay()
|
||||
{
|
||||
if ((rng::random() == NULL) && (commands().size() > 0)){
|
||||
set_random(commands()[pos_]);
|
||||
if (at_end())
|
||||
{
|
||||
add_command(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
set_random(commands()[pos_]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user