From cdf8394ccc4adac94aae9ac395d09eb03608ef2d Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Tue, 25 Jun 2024 00:05:31 +0200 Subject: [PATCH] Fix nullptr dereferencing (#5638) - closes https://github.com/assimp/assimp/issues/5617 --- code/AssetLib/FBX/FBXExporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/AssetLib/FBX/FBXExporter.cpp b/code/AssetLib/FBX/FBXExporter.cpp index ae210eb1a..50ce3bc2e 100644 --- a/code/AssetLib/FBX/FBXExporter.cpp +++ b/code/AssetLib/FBX/FBXExporter.cpp @@ -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 node_chain; - while (node != scene->mRootNode) { + while (node != scene->mRootNode && node != nullptr) { node_chain.push_back(node); node = node->mParent; }