[Bf-blender-cvs] [68e37552099] blender-v3.0-release: Fix T93555: crash when muting nodes with multiple internal links

Jacques Lucke noreply at git.blender.org
Thu Dec 2 11:14:01 CET 2021


Commit: 68e37552099231ff2b1beb6c7135dfa7fcc418e9
Author: Jacques Lucke
Date:   Thu Dec 2 09:41:36 2021 +0100
Branches: blender-v3.0-release
https://developer.blender.org/rB68e37552099231ff2b1beb6c7135dfa7fcc418e9

Fix T93555: crash when muting nodes with multiple internal links

The crash happened because I was incorrectly and inconsistently assuming
that a socket is part of at most one internal link. However, this is not the case.
In geometry nodes, an input socket can be internally linked to multiple
output sockets. In the general case, an output could also be linked to multiple
input sockets, even though we don't have that in Blender yet.

Dalai gave green light to cherry pick this fix for 3.0.

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

M	source/blender/nodes/intern/derived_node_tree.cc
M	source/blender/nodes/intern/node_tree_ref.cc

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

diff --git a/source/blender/nodes/intern/derived_node_tree.cc b/source/blender/nodes/intern/derived_node_tree.cc
index 8a9386c1137..e2f4ebf17c3 100644
--- a/source/blender/nodes/intern/derived_node_tree.cc
+++ b/source/blender/nodes/intern/derived_node_tree.cc
@@ -281,7 +281,6 @@ void DOutputSocket::foreach_target_socket(ForeachTargetSocketFn target_fn,
         mute_output.foreach_target_socket(target_fn, path_info);
         path_info.sockets.pop_last();
         path_info.sockets.pop_last();
-        break;
       }
     }
     else if (linked_node->is_group_output_node()) {
diff --git a/source/blender/nodes/intern/node_tree_ref.cc b/source/blender/nodes/intern/node_tree_ref.cc
index 5481465aef6..d58521e7b72 100644
--- a/source/blender/nodes/intern/node_tree_ref.cc
+++ b/source/blender/nodes/intern/node_tree_ref.cc
@@ -262,7 +262,6 @@ void InputSocketRef::foreach_logical_origin(
           skipped_fn.call_safe(origin);
           skipped_fn.call_safe(mute_input);
           mute_input.foreach_logical_origin(origin_fn, skipped_fn, true, seen_sockets_stack);
-          break;
         }
       }
     }



More information about the Bf-blender-cvs mailing list