Fix nullptr dereferencing (#5638)

- closes https://github.com/assimp/assimp/issues/5617
pull/5435/head^2
Kim Kulling 2024-06-25 00:05:31 +02:00 committed by GitHub
parent dd10fb6ee4
commit cdf8394ccc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -1051,7 +1051,7 @@ aiNode* get_node_for_mesh(unsigned int meshIndex, aiNode* node)
aiMatrix4x4 get_world_transform(const aiNode* node, const aiScene* scene)
{
std::vector<const aiNode*> node_chain;
while (node != scene->mRootNode) {
while (node != scene->mRootNode && node != nullptr) {
node_chain.push_back(node);
node = node->mParent;
}