Ensure face pointer is not nullptr

- closes https://github.com/assimp/assimp/issues/4831
This commit is contained in:
Kim Kulling
2022-12-08 09:35:11 +01:00
committed by GitHub
parent 65bedac389
commit 769b47ed0e

View File

@@ -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) {