Fix double free caused in FindInvalidDataProcess

In debug builds, there's no issues, but in release, an invalid mesh that
is deleted in FindInvalidDataProcess will be double free'd when the
parent scene is destroyed.
This commit is contained in:
Ryan Styrczula
2020-05-19 14:38:10 -04:00
parent 3b15eca099
commit c4055d04b4

View File

@@ -124,7 +124,7 @@ void FindInvalidDataProcess::Execute(aiScene *pScene) {
if (2 == result) {
// remove this mesh
delete pScene->mMeshes[a];
AI_DEBUG_INVALIDATE_PTR(pScene->mMeshes[a]);
pScene->mMeshes[a] = NULL;
meshMapping[a] = UINT_MAX;
continue;