[Bf-blender-cvs] [7abd79398d7] master: Fix T101642: crash when deleting group output inside node group

Jacques Lucke noreply at git.blender.org
Tue Oct 18 16:15:43 CEST 2022


Commit: 7abd79398d712be54935c01f1d2eefb5eaba64a9
Author: Jacques Lucke
Date:   Tue Oct 18 16:15:12 2022 +0200
Branches: master
https://developer.blender.org/rB7abd79398d712be54935c01f1d2eefb5eaba64a9

Fix T101642: crash when deleting group output inside node group

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

M	source/blender/nodes/intern/geometry_nodes_lazy_function.cc

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

diff --git a/source/blender/nodes/intern/geometry_nodes_lazy_function.cc b/source/blender/nodes/intern/geometry_nodes_lazy_function.cc
index 5bf245f1832..197f0997160 100644
--- a/source/blender/nodes/intern/geometry_nodes_lazy_function.cc
+++ b/source/blender/nodes/intern/geometry_nodes_lazy_function.cc
@@ -604,6 +604,7 @@ class LazyFunctionForGroupNode : public LazyFunction {
  private:
   const bNode &group_node_;
   bool has_many_nodes_ = false;
+  bool use_fallback_outputs_ = false;
   std::optional<GeometryNodesLazyFunctionLogger> lf_logger_;
   std::optional<GeometryNodesLazyFunctionSideEffectProvider> lf_side_effect_provider_;
   std::optional<lf::GraphExecutor> graph_executor_;
@@ -640,6 +641,9 @@ class LazyFunctionForGroupNode : public LazyFunction {
         }
       }
     }
+    else {
+      use_fallback_outputs_ = true;
+    }
 
     lf_logger_.emplace(lf_graph_info);
     lf_side_effect_provider_.emplace();
@@ -660,6 +664,11 @@ class LazyFunctionForGroupNode : public LazyFunction {
        * if every individual node is very small. */
       lazy_threading::send_hint();
     }
+    if (use_fallback_outputs_) {
+      /* The node group itself does not have an output node, so use default values as outputs.
+       * The group should still be executed in case it has side effects. */
+      params.set_default_remaining_outputs();
+    }
 
     /* The compute context changes when entering a node group. */
     bke::NodeGroupComputeContext compute_context{user_data->compute_context, group_node_.name};



More information about the Bf-blender-cvs mailing list