소스 검색

Ensure face pointer is not nullptr

- closes https://github.com/assimp/assimp/issues/4831
Kim Kulling 2 년 전
부모
커밋
769b47ed0e
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      code/Common/ScenePreprocessor.cpp

+ 1 - 0
code/Common/ScenePreprocessor.cpp

@@ -142,6 +142,7 @@ void ScenePreprocessor::ProcessMesh(aiMesh *mesh) {
     // If the information which primitive types are there in the
     // If the information which primitive types are there in the
     // mesh is currently not available, compute it.
     // mesh is currently not available, compute it.
     if (!mesh->mPrimitiveTypes) {
     if (!mesh->mPrimitiveTypes) {
+        ai_assert(mesh->mFaces != nullptr);
         for (unsigned int a = 0; a < mesh->mNumFaces; ++a) {
         for (unsigned int a = 0; a < mesh->mNumFaces; ++a) {
             aiFace &face = mesh->mFaces[a];
             aiFace &face = mesh->mFaces[a];
             switch (face.mNumIndices) {
             switch (face.mNumIndices) {