Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-05-26 13:24:56 +0300
committerJacques Lucke <jacques@blender.org>2021-05-26 13:25:48 +0300
commitafec66c024dc2b75447537d45406c06342ec201e (patch)
tree5e2d614542b832e4a3c062b4a373450d49d05a8c
parent12a06292af8678c2371b36369a96c088f438c9dd (diff)
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.
-rw-r--r--source/blender/nodes/intern/node_tree_ref.cc6
1 files changed, 6 insertions, 0 deletions
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);