Added NULL-pointer check to avoid crash in node editor. Fixes #31664

This commit is contained in:
Konrad Kleine
2012-06-01 13:42:18 +00:00
parent 17935168c0
commit 719b3e26e7

View File

@@ -46,7 +46,9 @@
/* for a given socket, find the actual stack entry */
bNodeStack *node_get_socket_stack(bNodeStack *stack, bNodeSocket *sock)
{
return stack + sock->stack_index;
if (stack && sock)
return stack + sock->stack_index;
return NULL;
}
void node_get_stack(bNode *node, bNodeStack *stack, bNodeStack **in, bNodeStack **out)