Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonrad Kleine <konrad.wilhelm.kleine@gmail.com>2012-06-01 17:42:18 +0400
committerKonrad Kleine <konrad.wilhelm.kleine@gmail.com>2012-06-01 17:42:18 +0400
commit719b3e26e768f03990be95e07f588b84deef9caa (patch)
treefc2ec1840631955e60d63b8018e4c259cbc24597 /source/blender
parent17935168c07937f9b1d1db1874a9f7ba5d3ae540 (diff)
Added NULL-pointer check to avoid crash in node editor. Fixes #31664
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/nodes/intern/node_exec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/nodes/intern/node_exec.c b/source/blender/nodes/intern/node_exec.c
index 3f77638e25a..d01ef2e2d52 100644
--- a/source/blender/nodes/intern/node_exec.c
+++ b/source/blender/nodes/intern/node_exec.c
@@ -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)