Skip to content

Commit

Permalink
fix startup crash by "index out of range" exception when locally load…
Browse files Browse the repository at this point in the history
…ing unsupported definitions
  • Loading branch information
cre4ture committed Sep 14, 2019
1 parent e0f7f38 commit 0278529
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions definitionmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,9 @@ void DefinitionManager::loadDefinition(QString path) {
d.id = entityManager.addDefinitions(
dynamic_cast<JSONArray*>(def->at("data")));
d.type = Definition::Entity;
} else {
delete def;
return; // unknown type
}
definitions.insert(path, d);
delete def;
Expand Down

0 comments on commit 0278529

Please sign in to comment.