GPv3: Crash deleting end points

Crash is observed when `dst_curve` nums are same as original curve.
`type_count` array in runtime struct of `dst_curve` is not updated after copying
curve attributes hence the crash/assert. In other case (when source and
dst curve_nums are different), type_count is updated when dst.finish()
is called in `gather_attributes()`

Pull Request: https://projects.blender.org/blender/blender/pulls/116839
This commit is contained in:
Pratik Borhade 2024-01-07 05:37:31 +01:00 committed by Pratik Borhade
parent b8b9ed075b
commit 26a629a696

@ -672,6 +672,7 @@ static bke::CurvesGeometry remove_points_and_split(const bke::CurvesGeometry &cu
gather_attributes(
src_attributes, bke::AttrDomain::Point, {}, {}, dst_to_src_point, dst_attributes);
dst_curves.update_curve_types();
dst_curves.remove_attributes_based_on_types();
return dst_curves;