Selaa lähdekoodia

Obj: fix nullptr access. (#5894)

Kim Kulling 10 kuukautta sitten
vanhempi
commit
5f100a0984
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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;
     }