Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2022-07-12 17:26:50 +0300
committerJacques Lucke <jacques@blender.org>2022-07-12 17:27:06 +0300
commitd58072caf4abb254d5e5f0e3b9de9bef775f287a (patch)
tree13a60046e31c007f1d889382620ca27e09eb7ce8 /source/blender/blenkernel/intern/geometry_component_curve.cc
parent47dd42485e19106601167f6be7b5960c4be25167 (diff)
Fix: missing geometry copy before modifying it
A geometry component may reference read-only geometry. In this case it has to be copied before making changes to it. This was caused by rBb876ce2a4a4638142.
Diffstat (limited to 'source/blender/blenkernel/intern/geometry_component_curve.cc')
-rw-r--r--source/blender/blenkernel/intern/geometry_component_curve.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/geometry_component_curve.cc b/source/blender/blenkernel/intern/geometry_component_curve.cc
index 0d899ec7b06..22f105af0f1 100644
--- a/source/blender/blenkernel/intern/geometry_component_curve.cc
+++ b/source/blender/blenkernel/intern/geometry_component_curve.cc
@@ -1452,7 +1452,8 @@ std::optional<blender::bke::AttributeAccessor> CurveComponentLegacy::attributes(
std::optional<blender::bke::MutableAttributeAccessor> CurveComponentLegacy::attributes_for_write()
{
- return blender::bke::MutableAttributeAccessor(curve_,
+ CurveEval *curve = this->get_for_write();
+ return blender::bke::MutableAttributeAccessor(curve,
blender::bke::get_curve_accessor_functions_ref());
}