Fix #133693: use-after-free in screw modifier

The mesh was tagged as changed after it has been freed.
It's freed in the call to `mesh_remove_doubles_on_axis`.
This commit is contained in:
Jacques Lucke
2025-01-28 11:06:37 +01:00
parent f7c543250f
commit 517768074b

View File

@@ -1021,6 +1021,7 @@ static Mesh *modify_mesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh
#endif
sharp_faces.finish();
dst_material_index.finish();
if (edge_face_map) {
MEM_freeN(edge_face_map);
@@ -1040,8 +1041,6 @@ static Mesh *modify_mesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh
ltmd->merge_dist);
}
dst_material_index.finish();
return result;
}