diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-08-06 23:11:59 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-08-06 23:11:59 +0400 |
commit | 723e52fb85387ffb62f768223b1600e34b9d087c (patch) | |
tree | 54243dbb96b57541147e0b446c9de19725bb7efe /source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp | |
parent | f961afece0a7bbcf758234bdf19cd35eae30dea2 (diff) |
Tile fix: Use the validity flag in node links directly instead of the indirect node level check for cyclic links to avoid crash in cases of invalid links, which can be created in some situations (reroute nodes). The link flag may have been set by additional constraints. It is much simpler to use and avoids the redundant check.
Diffstat (limited to 'source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp')
-rw-r--r-- | source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp b/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp index 4627d20ab2f..e41361fcb2e 100644 --- a/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp +++ b/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp @@ -154,12 +154,9 @@ static OutputSocket *find_output(NodeRange &node_range, bNode *bnode, bNodeSocke } SocketConnection *ExecutionSystemHelper::addNodeLink(NodeRange &node_range, vector<SocketConnection *>& links, bNodeLink *b_nodelink) { - /// @note: cyclic lines will be ignored. This has been copied from node.c - if (b_nodelink->tonode != 0 && b_nodelink->fromnode != 0) { - if (!(b_nodelink->fromnode->level >= b_nodelink->tonode->level && b_nodelink->tonode->level != 0xFFF)) { // only add non cyclic lines! so execution will procede - return NULL; - } - } + /// @note: ignore invalid links + if (!(b_nodelink->flag & NODE_LINK_VALID)) + return NULL; InputSocket *inputSocket = find_input(node_range, b_nodelink->tonode, b_nodelink->tosock); OutputSocket *outputSocket = find_output(node_range, b_nodelink->fromnode, b_nodelink->fromsock); |