Fix memory leak

pull/5119/head
Alex 2023-06-02 11:34:07 +00:00
parent 496a4bf156
commit 646d3591b6
1 changed files with 1 additions and 0 deletions

View File

@ -371,6 +371,7 @@ void ObjFileMtlImporter::getTexture() {
if (m_pModel->mCurrentMaterial == nullptr) { if (m_pModel->mCurrentMaterial == nullptr) {
m_pModel->mCurrentMaterial = new ObjFile::Material(); m_pModel->mCurrentMaterial = new ObjFile::Material();
m_pModel->mCurrentMaterial->MaterialName.Set("Empty_Material"); m_pModel->mCurrentMaterial->MaterialName.Set("Empty_Material");
m_pModel->mMaterialMap["Empty_Material"] = m_pModel->mCurrentMaterial;
} }
const char *pPtr(&(*m_DataIt)); const char *pPtr(&(*m_DataIt));