[Bf-blender-cvs] [295d5c6ef5b] master: Fix T96164: Crash with curve domain attributes
Hans Goudey
noreply at git.blender.org
Fri Mar 4 17:12:10 CET 2022
Commit: 295d5c6ef5b9a464cfdd52eaffb3c0e710ad4155
Author: Hans Goudey
Date: Fri Mar 4 11:11:56 2022 -0500
Branches: master
https://developer.blender.org/rB295d5c6ef5b9a464cfdd52eaffb3c0e710ad4155
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.
===================================================================
M 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<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);
More information about the Bf-blender-cvs
mailing list