Obj: fix nullptr access. (#5894)

This commit is contained in:
Kim Kulling
2024-11-25 19:58:58 +01:00
committed by GitHub
parent 795d4897db
commit 5f100a0984

View File

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