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
path: root/source
diff options
context:
space:
mode:
authorJohnny Matthews <johnny.matthews@gmail.com>2022-02-28 00:16:45 +0300
committerJohnny Matthews <johnny.matthews@gmail.com>2022-02-28 00:16:45 +0300
commit63891f9dad930f3d766d8586b909ca59ba089f3e (patch)
treee641c76b99ee0d9a3c1cde4594609a91bb371074 /source
parent4f2f3114b7be2760d74ef1024626dd9f960a7bf3 (diff)
Fix: Crash in Duplicate Element
Return early if a curve has a domain size of 0. T96060
Diffstat (limited to 'source')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
index 4c1d26e1012..c247a255e5b 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
@@ -771,6 +771,9 @@ static void duplicate_points_curve(const GeometryComponentType component_type,
{
const GeometryComponent &src_component = *geometry_set.get_component_for_read(component_type);
const int domain_size = src_component.attribute_domain_size(ATTR_DOMAIN_POINT);
+ if (domain_size == 0) {
+ return;
+ }
GeometryComponentFieldContext field_context{src_component, ATTR_DOMAIN_POINT};
FieldEvaluator evaluator{field_context, domain_size};