From a30936954ef49236397938305e9c05e57670203c Mon Sep 17 00:00:00 2001 From: RevoluPowered Date: Sun, 27 Oct 2019 11:21:23 +0000 Subject: [PATCH] Best to check the number of children before checking the actual array --- code/Common/scene.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/Common/scene.cpp b/code/Common/scene.cpp index 2acb348d8..315581504 100644 --- a/code/Common/scene.cpp +++ b/code/Common/scene.cpp @@ -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];