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.
This commit is contained in:
Jacques Lucke 2023-09-14 11:51:05 +02:00
parent 11b2ac54a6
commit e914004678

@ -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(