add assert for [load_resource] bug.

This commit is contained in:
gfgtdf 2018-12-02 17:37:43 +01:00 committed by GitHub
parent 16927f9508
commit 646e074e5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -373,6 +373,7 @@ void saved_game::expand_mp_events()
mods.clear();
while(starting_point_.has_child("load_resource")) {
assert(starting_point_.child_count("load_resource") > 0);
std::string id = starting_point_.child("load_resource")["id"];
size_t pos = starting_point_.find_total_first_of("load_resource");
starting_point_.remove_child("load_resource", 0);