Validate empty aiNode children as nullptr

This is the simplest way to get the unit tests to detect the logic error
This should never fire in real models, it indicates a bug in assimp itself.
pull/5749/head
RichardTea 2024-09-02 16:57:04 +01:00
parent b273332f01
commit 9baffe3ecf
1 changed files with 3 additions and 0 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);
}
}