diff --git a/source/blender/editors/curves/intern/curves_attribute_set.cc b/source/blender/editors/curves/intern/curves_attribute_set.cc index a94f9cff68f..b1c00b93c6a 100644 --- a/source/blender/editors/curves/intern/curves_attribute_set.cc +++ b/source/blender/editors/curves/intern/curves_attribute_set.cc @@ -93,8 +93,8 @@ static int set_attribute_exec(bContext *C, wmOperator *op) Object *active_object = CTX_data_active_object(C); Curves &active_curves_id = *static_cast(active_object->data); - AttributeOwner owner = AttributeOwner::from_id(&active_curves_id.id); - CustomDataLayer *active_attribute = BKE_attributes_active_get(owner); + AttributeOwner active_owner = AttributeOwner::from_id(&active_curves_id.id); + CustomDataLayer *active_attribute = BKE_attributes_active_get(active_owner); const eCustomDataType active_type = eCustomDataType(active_attribute->type); const CPPType &type = *bke::custom_data_type_to_cpp_type(active_type); @@ -107,6 +107,7 @@ static int set_attribute_exec(bContext *C, wmOperator *op) for (Curves *curves_id : get_unique_editable_curves(*C)) { bke::CurvesGeometry &curves = curves_id->geometry.wrap(); + AttributeOwner owner = AttributeOwner::from_id(&curves_id->id); CustomDataLayer *layer = BKE_attributes_active_get(owner); if (!layer) { continue;