mirror of
https://github.com/blender/blender
synced 2026-09-26 16:15:47 +03:00
Fix: Curves: Missing check in get_mutable_attribute
Same as fd92647f34.
Without this check, the function would try to create a new
attribute even if `num` was 0.
This commit is contained in:
parent
4b0ad27d88
commit
0177c55880
1 changed files with 3 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue