浏览代码

Fix memory leak

Alex 2 年之前
父节点
当前提交
6f3bfb5b60
共有 1 个文件被更改,包括 1 次插入0 次删除
  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));