From 6f3bfb5b60d45e7c53f504d04ed58b0019a01c13 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 2 Jun 2023 11:34:07 +0000 Subject: [PATCH] Fix memory leak --- code/AssetLib/Obj/ObjFileMtlImporter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/code/AssetLib/Obj/ObjFileMtlImporter.cpp b/code/AssetLib/Obj/ObjFileMtlImporter.cpp index f7d66d11b..f8e3e1cde 100644 --- a/code/AssetLib/Obj/ObjFileMtlImporter.cpp +++ b/code/AssetLib/Obj/ObjFileMtlImporter.cpp @@ -371,6 +371,7 @@ void ObjFileMtlImporter::getTexture() { if (m_pModel->mCurrentMaterial == nullptr) { m_pModel->mCurrentMaterial = new ObjFile::Material(); m_pModel->mCurrentMaterial->MaterialName.Set("Empty_Material"); + m_pModel->mMaterialMap["Empty_Material"] = m_pModel->mCurrentMaterial; } const char *pPtr(&(*m_DataIt));