Explorar el Código

Merge pull request #2095 from msfeldstein/master

Use delete[] instead of delete to clear mMeshes
Kim Kulling hace 7 años
padre
commit
5390ec1cb9
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      code/SplitByBoneCountProcess.cpp

+ 1 - 1
code/SplitByBoneCountProcess.cpp

@@ -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);