MDLLoader: Replace raw pointer with vector to fix a memory leak

This commit is contained in:
Turo Lamminen
2018-02-06 19:22:32 +02:00
parent 1aed63afb7
commit 9344074a04
2 changed files with 3 additions and 3 deletions

View File

@@ -1502,7 +1502,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
groupData.bNeed2UV = true;
}
}
groupData.pcFaces = new MDL::IntFace_MDL7[groupInfo.pcGroup->numtris];
groupData.pcFaces.resize(groupInfo.pcGroup->numtris);
// read all faces into the preallocated arrays
ReadFaces_3DGS_MDL7(groupInfo, groupData);