diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-03-05 13:34:14 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-03-05 13:34:14 +0400 |
commit | 6e76d538551015b0344e4ad2ce467b4f86ca77b1 (patch) | |
tree | 8f7c67f44953d5d211f97634991bb2aa158505a6 /source/blender/blenkernel | |
parent | dc4be68cb98e3eadd441975e9340c81a155befd3 (diff) |
Fix #34507, adding reroute node into invalid links would crash the compositor.
Compositor relies on correctly tagged invalid links, but the nodeInternalRelink function used to replace reroute nodes in localization did not correctly take this flag into account. If a node replaces a link with an invalid upstream link the resulting link must also be flagged invalid.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 3dbaab008f8..897e2ff2326 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -571,6 +571,12 @@ void nodeInternalRelink(bNodeTree *ntree, bNode *node) link->fromnode = fromlink->fromnode; link->fromsock = fromlink->fromsock; + /* if the up- or downstream link is invalid, + * the replacement link will be invalid too. + */ + if (!(fromlink->flag & NODE_LINK_VALID)) + link->flag &= ~NODE_LINK_VALID; + ntree->update |= NTREE_UPDATE_LINKS; } else |