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
parent
b273332f01
commit
9baffe3ecf
|
@ -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);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue