Skip to content

Commit

Permalink
Editor: fixed crash when loading scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Sep 9, 2016
1 parent 9630ed4 commit eea7bc0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/editor/map/map_context.cpp
Expand Up @@ -317,7 +317,10 @@ void map_context::load_scenario(const config& game_config)
music_tracks_.insert(std::pair<std::string, sound::music_track>(music["name"], sound::music_track(music)));
}

resources::gameboard->teams() = teams_;
// TODO: is the gameboard *supposed* to be loaded here...?
if(resources::gameboard) {
resources::gameboard->teams() = teams_;
}

int i = 1;
for(config &side : scenario.child_range("side"))
Expand Down

0 comments on commit eea7bc0

Please sign in to comment.