Fix: Curves: Missing check in get_mutable_attribute

Same as fd92647f3457bcd8d8c95d93f7e069c97a6599c4.
Without this check, the function would try to create a new
attribute even if `num` was 0.
This commit is contained in:
Falk David 2024-03-19 17:09:08 +01:00
parent 4b0ad27d88
commit 0177c55880

@ -244,6 +244,9 @@ static MutableSpan<T> get_mutable_attribute(CurvesGeometry &curves,
const T default_value = T())
{
const int num = domain_num(curves, domain);
if (num <= 0) {
return {};
}
const eCustomDataType type = cpp_type_to_custom_data_type(CPPType::get<T>());
CustomData &custom_data = domain_custom_data(curves, domain);