From 4fb5cf4ba6102c4e62113cc37b53c383c9c11708 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Tue, 7 Jun 2022 23:33:56 +0200 Subject: [PATCH] Fix possible nullptr exception - closes https://github.com/assimp/assimp/issues/4418 --- code/AssetLib/glTF2/glTF2Exporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/AssetLib/glTF2/glTF2Exporter.cpp b/code/AssetLib/glTF2/glTF2Exporter.cpp index ffd8d223e..932fc4197 100644 --- a/code/AssetLib/glTF2/glTF2Exporter.cpp +++ b/code/AssetLib/glTF2/glTF2Exporter.cpp @@ -908,7 +908,7 @@ Ref FindSkeletonRootJoint(Ref &skinRef) { do { startNodeRef = parentNodeRef; parentNodeRef = startNodeRef->parent; - } while (!parentNodeRef->jointName.empty()); + } while (nullptr != parentNodeRef && !parentNodeRef->jointName.empty()); return parentNodeRef; }