소스 검색

Obj: fix nullptr access. (#5894)

Kim Kulling 9 달 전
부모
커밋
5f100a0984
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      code/AssetLib/Obj/ObjFileImporter.cpp

+ 1 - 1
code/AssetLib/Obj/ObjFileImporter.cpp

@@ -401,7 +401,7 @@ void ObjFileImporter::createVertexArray(const ObjFile::Model *pModel,
         aiMesh *pMesh,
         unsigned int numIndices) {
     // Checking preconditions
-    if (pCurrentObject == nullptr) {
+    if (pCurrentObject == nullptr || pModel == nullptr || pMesh == nullptr) {
         return;
     }