diff --git a/code/AssetLib/SMD/SMDLoader.cpp b/code/AssetLib/SMD/SMDLoader.cpp index 1a860568a..2a43aab09 100644 --- a/code/AssetLib/SMD/SMDLoader.cpp +++ b/code/AssetLib/SMD/SMDLoader.cpp @@ -231,7 +231,7 @@ void SMDImporter::CreateOutputMeshes() { pScene->mMeshes = new aiMesh*[pScene->mNumMeshes]; typedef std::vector FaceList; - FaceList* aaiFaces = new FaceList[pScene->mNumMeshes]; + std::unique_ptr aaiFaces(new FaceList[pScene->mNumMeshes]); // approximate the space that will be required unsigned int iNum = (unsigned int)asTriangles.size() / pScene->mNumMeshes; @@ -392,7 +392,6 @@ void SMDImporter::CreateOutputMeshes() { } delete[] aaiBones; } - delete[] aaiFaces; } // ------------------------------------------------------------------------------------------------