Explorar o código

Fix memory leak

Alex %!s(int64=2) %!d(string=hai) anos
pai
achega
646d3591b6
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      code/AssetLib/Obj/ObjFileMtlImporter.cpp

+ 1 - 0
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));