Fix NodeGroup generic verify function crashing if node's ID pointer is NULL.
Another nice crasher - in this case, we just want to nuke all sockets... Related to T49991.
This commit is contained in:
parent
bd6a9fd734
commit
fa6a62fac2
|
@ -178,9 +178,14 @@ void node_group_verify(struct bNodeTree *ntree, struct bNode *node, struct ID *i
|
|||
{
|
||||
/* check inputs and outputs, and remove or insert them */
|
||||
if (id == node->id) {
|
||||
bNodeTree *ngroup = (bNodeTree *)node->id;
|
||||
group_verify_socket_list(ntree, node, &ngroup->inputs, &node->inputs, SOCK_IN);
|
||||
group_verify_socket_list(ntree, node, &ngroup->outputs, &node->outputs, SOCK_OUT);
|
||||
if (id == NULL) {
|
||||
nodeRemoveAllSockets(ntree, node);
|
||||
}
|
||||
else {
|
||||
bNodeTree *ngroup = (bNodeTree *)node->id;
|
||||
group_verify_socket_list(ntree, node, &ngroup->inputs, &node->inputs, SOCK_IN);
|
||||
group_verify_socket_list(ntree, node, &ngroup->outputs, &node->outputs, SOCK_OUT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue