Fix T92387: crash in legacy point distribute node

This was caused by rB40c3b8836b7a36303ea9c78b0932758cbf277f93.
The same fix exists in the Distribute Points on Faces node.
This commit is contained in:
Jacques Lucke 2021-10-21 12:06:38 +02:00
parent 2eb2e861a3
commit e79e86018e
1 changed files with 5 additions and 0 deletions

View File

@ -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];