浏览代码

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;
     }