From e914004678fbcd9bcf08e3d340715f90f550f5cd Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Thu, 14 Sep 2023 11:51:05 +0200 Subject: [PATCH] Fix #111411: crash with group node that references linked-but-not-found group These group nodes currently don't have a socket declaration for every socket. Instead we just don't touch the sockets at all so that things have not changed when the node group is found again. --- source/blender/editors/space_node/drawnode.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/space_node/drawnode.cc b/source/blender/editors/space_node/drawnode.cc index bce6ba535d0..9e7ec8c42c5 100644 --- a/source/blender/editors/space_node/drawnode.cc +++ b/source/blender/editors/space_node/drawnode.cc @@ -1284,14 +1284,18 @@ static void node_file_output_socket_draw(bContext *C, static bool socket_needs_attribute_search(bNode &node, bNodeSocket &socket) { - if (node.runtime->declaration == nullptr) { + const nodes::NodeDeclaration *node_decl = node.declaration(); + if (node_decl == nullptr) { + return false; + } + if (node_decl->skip_updating_sockets) { return false; } if (socket.in_out == SOCK_OUT) { return false; } const int socket_index = BLI_findindex(&node.inputs, &socket); - return node.declaration()->inputs[socket_index]->is_attribute_name; + return node_decl->inputs[socket_index]->is_attribute_name; } static void std_node_socket_draw(