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

pull/2731/head
RevoluPowered 2019-10-27 11:21:23 +00:00
parent 514257f587
commit a30936954e
1 changed files with 1 additions and 1 deletions

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];