- LWSLoader: don't use free().

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1097 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/3/head^2
aramis_acg 2011-12-12 00:04:58 +00:00
parent 5957e9996b
commit d9f7df6bcd
1 changed files with 3 additions and 2 deletions

View File

@ -338,8 +338,9 @@ void LWSImporter::BuildGraph(aiNode* nd, LWS::NodeDesc& src, std::vector<Attachm
//Remove first node from obj (the old pivot), reset transform of second node (the mesh node) //Remove first node from obj (the old pivot), reset transform of second node (the mesh node)
aiNode* newRootNode = obj->mRootNode->mChildren[0]; aiNode* newRootNode = obj->mRootNode->mChildren[0];
free(obj->mRootNode->mChildren); obj->mRootNode->mChildren[0] = NULL;
free(obj->mRootNode); delete obj->mRootNode;
obj->mRootNode = newRootNode; obj->mRootNode = newRootNode;
obj->mRootNode->mTransformation.a4 = 0.0; obj->mRootNode->mTransformation.a4 = 0.0;
obj->mRootNode->mTransformation.b4 = 0.0; obj->mRootNode->mTransformation.b4 = 0.0;