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.
This commit is contained in:
Jacques Lucke 2021-05-26 12:24:56 +02:00
parent 12a06292af
commit afec66c024
Notes: blender-bot 2023-02-14 00:20:15 +01:00
Referenced by issue #88588, Geometry node crash when muting a node
1 changed files with 6 additions and 0 deletions

View File

@ -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);