Best to check the number of children before checking the actual array
parent
514257f587
commit
a30936954e
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue