Fixed a crash when starting with wesnoth --multiplayer
YogiHH please review the changes. The bug was introduced while fixing bug #8308, after the fix the tutorial still behaves as it should.
This commit is contained in:
parent
60747af7d2
commit
a10982b43e
1 changed files with 5 additions and 1 deletions
|
@ -143,7 +143,11 @@ LEVEL_RESULT play_game(display& disp, game_state& gamestate, const config& game_
|
|||
LOG_G << "loading snapshot...\n";
|
||||
starting_pos = gamestate.starting_pos;
|
||||
scenario = &gamestate.snapshot;
|
||||
gamestate.variables = *gamestate.snapshot.child("variables");
|
||||
// when starting wesnoth --multiplayer there might be
|
||||
// no variables which leads to a segfault
|
||||
if(gamestate.snapshot.child("variables") != NULL) {
|
||||
gamestate.variables = *gamestate.snapshot.child("variables");
|
||||
}
|
||||
}
|
||||
|
||||
controller_map controllers;
|
||||
|
|
Loading…
Add table
Reference in a new issue