Best to check the number of children before checking the actual array

This commit is contained in:
RevoluPowered
2019-10-27 11:21:23 +00:00
parent 514257f587
commit a30936954e

View File

@@ -68,7 +68,7 @@ aiNode::aiNode(const std::string& name)
aiNode::~aiNode() {
// delete all children recursively
// to make sure we won't crash if the data is invalid ...
if (mChildren && mNumChildren)
if (mNumChildren && mChildren)
{
for (unsigned int a = 0; a < mNumChildren; a++)
delete mChildren[a];