[Bf-blender-cvs] [0844781961e] blender-v3.3-release: Fix: Crash on instance on points node with empty mesh

Hans Goudey noreply at git.blender.org
Thu Aug 4 16:15:31 CEST 2022


Commit: 0844781961e8fb92c5b3a09de23ca0c3a0fff0c2
Author: Hans Goudey
Date:   Thu Aug 4 09:15:08 2022 -0500
Branches: blender-v3.3-release
https://developer.blender.org/rB0844781961e8fb92c5b3a09de23ca0c3a0fff0c2

Fix: Crash on instance on points node with empty mesh

===================================================================

M	source/blender/nodes/geometry/nodes/node_geo_instance_on_points.cc

===================================================================

diff --git a/source/blender/nodes/geometry/nodes/node_geo_instance_on_points.cc b/source/blender/nodes/geometry/nodes/node_geo_instance_on_points.cc
index 119d895fead..37f9917f39d 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_instance_on_points.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_instance_on_points.cc
@@ -70,6 +70,9 @@ static void add_instances_from_component(
   evaluator.evaluate();
 
   const IndexMask selection = evaluator.get_evaluated_selection_as_mask();
+  if (selection.is_empty()) {
+    return;
+  }
 
   /* The initial size of the component might be non-zero when this function is called for multiple
    * component types. */



More information about the Bf-blender-cvs mailing list