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.
This commit is contained in:
Hans Goudey 2022-03-04 11:11:56 -05:00
parent 1763ffa0be
commit 295d5c6ef5
Notes: blender-bot 2023-02-13 22:37:44 +01:00
Referenced by issue #96164, Geometry Nodes: Crash when changing domain to spline on capture attribute
Referenced by issue #96070, File browser crashes blender when closing the window
1 changed files with 2 additions and 0 deletions

View File

@ -436,6 +436,8 @@ std::unique_ptr<CurveEval> 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);