From ecdf8d24b85367b22ba353b4f82299d4af7f1f97 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Mon, 7 Oct 2024 10:30:45 +0200 Subject: [PATCH] SplitLargeMeshes: Fix crash (#5799) - Fix nullptr access when rootnode of the scene is a nullptr. This can happen even if the scene stores any kind of meshes. closes https://github.com/assimp/assimp/issues/5791 --- code/SplitLargeMeshes.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/SplitLargeMeshes.cpp b/code/SplitLargeMeshes.cpp index 5e21ec6..9a09316 100644 --- a/code/SplitLargeMeshes.cpp +++ b/code/SplitLargeMeshes.cpp @@ -113,6 +113,9 @@ void SplitLargeMeshesProcess_Triangle::SetupProperties( const Importer* pImp) void SplitLargeMeshesProcess_Triangle::UpdateNode(aiNode* pcNode, const std::vector >& avList) { + if (pcNode == nullptr) { + return; + } // for every index in out list build a new entry std::vector aiEntries; aiEntries.reserve(pcNode->mNumMeshes + 1); -- 2.33.0