فهرست منبع

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