Use array delete command vs object delete since mMeshes is allocated with new[]

pull/2095/head
Mike Feldstein 2018-08-16 13:56:35 -07:00
parent 1388e0b79f
commit 0ba57202f7
1 changed files with 1 additions and 1 deletions

View File

@ -393,7 +393,7 @@ void SplitByBoneCountProcess::UpdateNode( aiNode* pNode) const
newMeshList.insert( newMeshList.end(), replaceMeshes.begin(), replaceMeshes.end());
}
delete pNode->mMeshes;
delete [] pNode->mMeshes;
pNode->mNumMeshes = static_cast<unsigned int>(newMeshList.size());
pNode->mMeshes = new unsigned int[pNode->mNumMeshes];
std::copy( newMeshList.begin(), newMeshList.end(), pNode->mMeshes);