diff options
author | Jacques Lucke <jacques@blender.org> | 2021-04-21 17:21:54 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-04-21 17:21:54 +0300 |
commit | b1fcc8e6ba25d5429cc868615c3b514e360ef912 (patch) | |
tree | a18a0a930a28ba91a59bfaae6fbc755ad53d4eec /source/blender/nodes/NOD_node_tree_ref.hh | |
parent | b72d9216f12edb37e79ce2fe17c72bb5a072db6a (diff) |
Fix T87659: crash when creating reroute loop in geometry nodes
This was a regression introduced in rB0ff3f96a1b0193d69dae5ca69e7c93d6cdf34558.
Diffstat (limited to 'source/blender/nodes/NOD_node_tree_ref.hh')
-rw-r--r-- | source/blender/nodes/NOD_node_tree_ref.hh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/nodes/NOD_node_tree_ref.hh b/source/blender/nodes/NOD_node_tree_ref.hh index 8b430ea1c48..5795617deb0 100644 --- a/source/blender/nodes/NOD_node_tree_ref.hh +++ b/source/blender/nodes/NOD_node_tree_ref.hh @@ -132,23 +132,31 @@ class SocketRef : NonCopyable, NonMovable { class InputSocketRef final : public SocketRef { public: + friend NodeTreeRef; + Span<const OutputSocketRef *> logically_linked_sockets() const; Span<const OutputSocketRef *> directly_linked_sockets() const; bool is_multi_input_socket() const; + private: void foreach_logical_origin(FunctionRef<void(const OutputSocketRef &)> origin_fn, FunctionRef<void(const SocketRef &)> skipped_fn, - bool only_follow_first_input_link = false) const; + bool only_follow_first_input_link, + Vector<const InputSocketRef *> &handled_sockets) const; }; class OutputSocketRef final : public SocketRef { public: + friend NodeTreeRef; + Span<const InputSocketRef *> logically_linked_sockets() const; Span<const InputSocketRef *> directly_linked_sockets() const; + private: void foreach_logical_target(FunctionRef<void(const InputSocketRef &)> target_fn, - FunctionRef<void(const SocketRef &)> skipped_fn) const; + FunctionRef<void(const SocketRef &)> skipped_fn, + Vector<const OutputSocketRef *> &handled_sockets) const; }; class NodeRef : NonCopyable, NonMovable { |