[Bf-blender-cvs] [c5f5046efd0] master: Fix T103208: unavailable socket linked to multi-input socket crashes

Iliya Katueshenock noreply at git.blender.org
Wed Dec 14 18:29:40 CET 2022


Commit: c5f5046efd07a81232904ab6cb6a94f0c755f376
Author: Iliya Katueshenock
Date:   Wed Dec 14 18:28:07 2022 +0100
Branches: master
https://developer.blender.org/rBc5f5046efd07a81232904ab6cb6a94f0c755f376

Fix T103208: unavailable socket linked to multi-input socket crashes

Differential Revision: https://developer.blender.org/D16772

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

M	source/blender/nodes/intern/geometry_nodes_lazy_function.cc

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

diff --git a/source/blender/nodes/intern/geometry_nodes_lazy_function.cc b/source/blender/nodes/intern/geometry_nodes_lazy_function.cc
index d7d633353bd..cad92cc0d90 100644
--- a/source/blender/nodes/intern/geometry_nodes_lazy_function.cc
+++ b/source/blender/nodes/intern/geometry_nodes_lazy_function.cc
@@ -157,9 +157,11 @@ class LazyFunctionForMultiInput : public LazyFunction {
     BLI_assert(socket.is_multi_input());
     const bNodeTree &btree = socket.owner_tree();
     for (const bNodeLink *link : socket.directly_linked_links()) {
-      if (!(link->is_muted() || nodeIsDanglingReroute(&btree, link->fromnode))) {
-        inputs_.append({"Input", *base_type_});
+      if (link->is_muted() || !link->fromsock->is_available() ||
+          nodeIsDanglingReroute(&btree, link->fromnode)) {
+        continue;
       }
+      inputs_.append({"Input", *base_type_});
     }
     const CPPType *vector_type = get_vector_type(*base_type_);
     BLI_assert(vector_type != nullptr);



More information about the Bf-blender-cvs mailing list