mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-11 21:52:43 +02:00
AnimNodeLoader: Fix for crash condition
When a node with children had an error loading, it would lead to a nullptr dereference.
This commit is contained in:
parent
2b4788929f
commit
9b9bd7fe26
1 changed files with 3 additions and 0 deletions
|
@ -160,6 +160,9 @@ static AnimNode::Pointer loadNode(const QJsonObject& jsonObj, const QUrl& jsonUr
|
|||
|
||||
assert((int)type >= 0 && type < AnimNode::Type::NumTypes);
|
||||
auto node = (animNodeTypeToLoaderFunc(type))(dataObj, id, jsonUrl);
|
||||
if (!node) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto childrenValue = jsonObj.value("children");
|
||||
if (!childrenValue.isArray()) {
|
||||
|
|
Loading…
Reference in a new issue