[Bf-blender-cvs] [e79e86018e3] master: Fix T92387: crash in legacy point distribute node
Jacques Lucke
noreply at git.blender.org
Thu Oct 21 12:07:34 CEST 2021
Commit: e79e86018e3879b1587df58ee58fabbce844084f
Author: Jacques Lucke
Date: Thu Oct 21 12:06:38 2021 +0200
Branches: master
https://developer.blender.org/rBe79e86018e3879b1587df58ee58fabbce844084f
Fix T92387: crash in legacy point distribute node
This was caused by rB40c3b8836b7a36303ea9c78b0932758cbf277f93.
The same fix exists in the Distribute Points on Faces node.
===================================================================
M source/blender/nodes/geometry/nodes/legacy/node_geo_point_distribute.cc
===================================================================
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];
More information about the Bf-blender-cvs
mailing list