From 295d5c6ef5b9a464cfdd52eaffb3c0e710ad4155 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 4 Mar 2022 11:11:56 -0500 Subject: Fix T96164: Crash with curve domain attributes When converting from the new type to the old, the curve domain attributes weren't properly resized, so their data was not properly allocated. --- source/blender/blenkernel/intern/curve_eval.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/blenkernel/intern/curve_eval.cc') diff --git a/source/blender/blenkernel/intern/curve_eval.cc b/source/blender/blenkernel/intern/curve_eval.cc index d6525a11cff..1ffbed39216 100644 --- a/source/blender/blenkernel/intern/curve_eval.cc +++ b/source/blender/blenkernel/intern/curve_eval.cc @@ -436,6 +436,8 @@ std::unique_ptr curves_to_curve_eval(const Curves &curves) curve_eval->add_spline(std::move(spline)); } + curve_eval->attributes.reallocate(curve_eval->splines().size()); + CurveComponentLegacy dst_component; dst_component.replace(curve_eval.get(), GeometryOwnershipType::Editable); -- cgit v1.2.3