diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2011-11-20 20:57:50 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2011-11-20 20:57:50 +0400 |
commit | d1af9fae3745b2a61132b5d6ce1a4e175c445853 (patch) | |
tree | a62184e9f3601a5ad9743613cba0028133e0287f /source | |
parent | 6673c76e78742c64ccd0afa7a9d1f598a8022878 (diff) |
Fix for crasher when node group tree datablocks are missing.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_common.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_common.c b/source/blender/nodes/composite/nodes/node_composite_common.c index 1b38609ce24..f3e0edfc691 100644 --- a/source/blender/nodes/composite/nodes/node_composite_common.c +++ b/source/blender/nodes/composite/nodes/node_composite_common.c @@ -119,6 +119,9 @@ static void *group_initexec(bNode *node) bNodeSocket *sock; bNodeStack *ns; + if (!ngroup) + return NULL; + /* initialize the internal node tree execution */ exec = ntreeCompositBeginExecTree(ngroup, 0); @@ -137,7 +140,8 @@ static void group_freeexec(bNode *UNUSED(node), void *nodedata) { bNodeTreeExec *gexec= (bNodeTreeExec*)nodedata; - ntreeCompositEndExecTree(gexec, 0); + if (gexec) + ntreeCompositEndExecTree(gexec, 0); } /* Copy inputs to the internal stack. @@ -191,6 +195,9 @@ static void group_execute(void *data, int thread, struct bNode *node, void *node { bNodeTreeExec *exec= (bNodeTreeExec*)nodedata; + if (!exec) + return; + /* XXX same behavior as trunk: all nodes inside group are executed. * it's stupid, but just makes it work. compo redesign will do this better. */ |