Skip to content

Commit

Permalink
fix crash when selecting a random scenario in mp create
Browse files Browse the repository at this point in the history
previously the game would crash (manditory child missing) in depcheck.cpp if the id of the generated scenario is not the same as the id of the outer scenario.
  • Loading branch information
gfgtdf committed Nov 13, 2017
1 parent 34c6fcd commit 6713070
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/game_initialization/create_engine.cpp
Expand Up @@ -337,6 +337,8 @@ void create_engine::init_generated_level_data()

const std::string& description = cur_lev->data()["description"];
data["description"] = description;
// TODO: should we also carryover [story] from the outer scenario as we do in saved_game.cpp
data["id"] = cur_lev->data()["id"];

cur_lev->set_data(data);
}
Expand Down

0 comments on commit 6713070

Please sign in to comment.