diff options
author | Ton Roosendaal <ton@blender.org> | 2013-02-27 18:25:39 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2013-02-27 18:25:39 +0400 |
commit | a8c48058f9f93a45c84ab292ba8c1b1b66c0a39c (patch) | |
tree | 862bb333a04549608557d2be91a0c8edceb37b20 /source/blender/nodes | |
parent | 713c9afb3927d12086c7bbcd11b947893e6ccc92 (diff) |
Bug fix #34436
Two example files that crashed texture nodes.
- On delete texture nodes, it should free the exec cache (because this cache
stores the node pointer.
- On redo, nodes can exist can exist without typeinfo set. Exec (free) code
was not checking for that. Don't ask me why this happens... tex nodes are weird.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/intern/node_exec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/nodes/intern/node_exec.c b/source/blender/nodes/intern/node_exec.c index 7a8b8c940c9..8cf7cc7a1ea 100644 --- a/source/blender/nodes/intern/node_exec.c +++ b/source/blender/nodes/intern/node_exec.c @@ -248,8 +248,9 @@ void ntree_exec_end(bNodeTreeExec *exec) MEM_freeN(exec->stack); for (n=0, nodeexec= exec->nodeexec; n < exec->totnodes; ++n, ++nodeexec) { - if (nodeexec->node->typeinfo->freeexecfunc) - nodeexec->node->typeinfo->freeexecfunc(nodeexec->node, nodeexec->data); + if (nodeexec->node->typeinfo) + if (nodeexec->node->typeinfo->freeexecfunc) + nodeexec->node->typeinfo->freeexecfunc(nodeexec->node, nodeexec->data); } if (exec->nodeexec) |