diff options
author | Jacques Lucke <jacques@blender.org> | 2022-11-11 13:48:56 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-11-11 13:48:56 +0300 |
commit | 57dd1b7799e7453e34c3a503333d0eadfa87af17 (patch) | |
tree | adce5313453c5c3aafdf687dd31862bb0d888bf5 /source/blender/editors/interface/interface_ops.cc | |
parent | 84c66fe9db932b82ebf445a63dfb629fb3c1b35c (diff) |
Fix T102386: crash when trying to link sockets from different node trees
This was caused by rBc39eb09ae587e1d9. The optimization broke the case
when the socket is not in the provided node tree. Now there are two separate
functions, one that always does the slow check to see of the socket is really
in the node tree and a potentially much faster version when we are sure
that the socket is in the tree.
Diffstat (limited to 'source/blender/editors/interface/interface_ops.cc')
-rw-r--r-- | source/blender/editors/interface/interface_ops.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_ops.cc b/source/blender/editors/interface/interface_ops.cc index 2d06dd2c465..1b576583291 100644 --- a/source/blender/editors/interface/interface_ops.cc +++ b/source/blender/editors/interface/interface_ops.cc @@ -1165,7 +1165,7 @@ bool UI_context_copy_to_selected_list(bContext *C, if (RNA_struct_is_a(ptr->type, &RNA_NodeSocket)) { bNodeTree *ntree = (bNodeTree *)ptr->owner_id; bNodeSocket *sock = static_cast<bNodeSocket *>(ptr->data); - if (nodeFindNode(ntree, sock, &node, nullptr)) { + if (nodeFindNodeTry(ntree, sock, &node, nullptr)) { if ((path = RNA_path_resolve_from_type_to_property(ptr, prop, &RNA_Node)) != nullptr) { /* we're good! */ } |