diff options
author | Jacques Lucke <jacques@blender.org> | 2022-10-18 17:15:12 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-10-18 17:15:27 +0300 |
commit | 7abd79398d712be54935c01f1d2eefb5eaba64a9 (patch) | |
tree | 9823fca435da1b347b73d4a71694a933af28acc7 /source/blender/nodes | |
parent | 5c1d2c5a9d336b7b41617139e04ace23229e8d1f (diff) |
Fix T101642: crash when deleting group output inside node group
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/intern/geometry_nodes_lazy_function.cc | 9 |
1 files changed, 9 insertions, 0 deletions
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}; |