[Bf-blender-cvs] [afec66c024d] master: Fix T88588: crash when muting node with multi input socket
Jacques Lucke
noreply at git.blender.org
Wed May 26 12:28:32 CEST 2021
Commit: afec66c024dc2b75447537d45406c06342ec201e
Author: Jacques Lucke
Date: Wed May 26 12:24:56 2021 +0200
Branches: master
https://developer.blender.org/rBafec66c024dc2b75447537d45406c06342ec201e
Fix T88588: crash when muting node with multi input socket
The bug existed before the new evaluator already, but the new evaluator
is more sensitive to this kind of error.
===================================================================
M source/blender/nodes/intern/node_tree_ref.cc
===================================================================
diff --git a/source/blender/nodes/intern/node_tree_ref.cc b/source/blender/nodes/intern/node_tree_ref.cc
index 5c0bc0b5ebc..8699736e543 100644
--- a/source/blender/nodes/intern/node_tree_ref.cc
+++ b/source/blender/nodes/intern/node_tree_ref.cc
@@ -297,6 +297,12 @@ void OutputSocketRef::foreach_logical_target(
skipped_fn.call_safe(target);
for (const InternalLinkRef *internal_link : target_node.internal_links()) {
if (&internal_link->from() == &target) {
+ /* The internal link only forwards the first incoming link. */
+ if (target.is_multi_input_socket()) {
+ if (target.directly_linked_links()[0] != link) {
+ continue;
+ }
+ }
const OutputSocketRef &mute_output = internal_link->to();
skipped_fn.call_safe(target);
skipped_fn.call_safe(mute_output);
More information about the Bf-blender-cvs
mailing list