Zero-length mChildren arrays should be nullptr (#5749)

- Children: Don't allocate a zero-length array
- aiNode::mChildren should be left nullptr instead.
This commit is contained in:
RichardTea
2024-09-03 09:26:27 +01:00
committed by GitHub
parent c35200e38e
commit c1ffbfec06
5 changed files with 27 additions and 12 deletions

View File

@@ -891,6 +891,9 @@ void ValidateDSProcess::Validate(const aiNode *pNode) {
ReportError("aiNode \"%s\" child %i \"%s\" parent is someone else: \"%s\"", pNode->mName.C_Str(), i, pChild->mName.C_Str(), parentName);
}
}
} else if (pNode->mChildren) {
ReportError("aiNode::mChildren is not nullptr for empty node %s (aiNode::mNumChildren is %i)",
nodeName, pNode->mNumChildren);
}
}