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:
authorJacques Lucke <jacques@blender.org>2021-10-21 13:06:38 +0300
committerJacques Lucke <jacques@blender.org>2021-10-21 13:07:03 +0300
commite79e86018e3879b1587df58ee58fabbce844084f (patch)
tree03df766af2bd2d17f5312cf32efd5bed23505d49 /source
parent2eb2e861a3f03fa471c5382e5e168acfacf69683 (diff)
Fix T92387: crash in legacy point distribute node
This was caused by rB40c3b8836b7a36303ea9c78b0932758cbf277f93. The same fix exists in the Distribute Points on Faces node.
Diffstat (limited to 'source')
-rw-r--r--source/blender/nodes/geometry/nodes/legacy/node_geo_point_distribute.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/nodes/geometry/nodes/legacy/node_geo_point_distribute.cc b/source/blender/nodes/geometry/nodes/legacy/node_geo_point_distribute.cc
index 892bf12d9c0..f30feb48734 100644
--- a/source/blender/nodes/geometry/nodes/legacy/node_geo_point_distribute.cc
+++ b/source/blender/nodes/geometry/nodes/legacy/node_geo_point_distribute.cc
@@ -623,6 +623,11 @@ static void geo_node_point_distribute_exec(GeoNodeExecParams params)
final_points_len += positions.size();
}
+ if (final_points_len == 0) {
+ params.set_output("Geometry", GeometrySet());
+ return;
+ }
+
PointCloud *pointcloud = BKE_pointcloud_new_nomain(final_points_len);
for (const int instance_index : positions_all.index_range()) {
const int offset = instance_start_offsets[instance_index];