Browse Source

Obj: fix nullptr access. (#5894)

Kim Kulling 9 months ago
parent
commit
5f100a0984
1 changed files with 1 additions and 1 deletions
  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;
     }