From 769b47ed0ea1fd5c480a24b85637e4ba5022a707 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 8 Dec 2022 09:35:11 +0100 Subject: [PATCH] Ensure face pointer is not nullptr - closes https://github.com/assimp/assimp/issues/4831 --- code/Common/ScenePreprocessor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/code/Common/ScenePreprocessor.cpp b/code/Common/ScenePreprocessor.cpp index c769ec30c..95c63ae1c 100644 --- a/code/Common/ScenePreprocessor.cpp +++ b/code/Common/ScenePreprocessor.cpp @@ -142,6 +142,7 @@ void ScenePreprocessor::ProcessMesh(aiMesh *mesh) { // If the information which primitive types are there in the // mesh is currently not available, compute it. if (!mesh->mPrimitiveTypes) { + ai_assert(mesh->mFaces != nullptr); for (unsigned int a = 0; a < mesh->mNumFaces; ++a) { aiFace &face = mesh->mFaces[a]; switch (face.mNumIndices) {