FindInvalidDataProcess: Mark removed meshes as "out"
There's a code path where an input scene only has a single mesh. In this case, if ProcessMesh returns 2, we delete the mesh and move on with the postprocessing. UpdateMeshReferences is not called and so the deleted mesh is left dangling in nodes. In a later step (SplitMesh in my testing), it then tries to deference a null pointer and we explode. With `out = true`, we can now hit the DeadlyImportError instead of a segfault.pull/3294/head
parent
c70d57be4f
commit
5717ea466f
|
@ -127,6 +127,7 @@ void FindInvalidDataProcess::Execute(aiScene *pScene) {
|
||||||
pScene->mMeshes[a] = NULL;
|
pScene->mMeshes[a] = NULL;
|
||||||
|
|
||||||
meshMapping[a] = UINT_MAX;
|
meshMapping[a] = UINT_MAX;
|
||||||
|
out = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue