Addressed a number of memory leaks identified in unit tests by asan

This commit is contained in:
Jared Mulconry
2017-10-01 23:16:21 +11:00
committed by Turo Lamminen
parent 29e46e4bb8
commit 1eb7eceddf
8 changed files with 44 additions and 8 deletions

View File

@@ -634,7 +634,7 @@ void PretransformVertices::Execute( aiScene* pScene)
aiNode* newRoot = new aiNode();
newRoot->mName = pScene->mRootNode->mName;
delete pScene->mRootNode;
pScene->mRootNode = new aiNode();
pScene->mRootNode = newRoot;
if (1 == pScene->mNumMeshes && !pScene->mNumLights && !pScene->mNumCameras)
{