Nodes: add asserts to detect invalid links earlier
This commit is contained in:
parent
9cef74f58b
commit
3340cc8102
|
@ -51,6 +51,10 @@ static void update_link_vector(const bNodeTree &ntree)
|
|||
bNodeTreeRuntime &tree_runtime = *ntree.runtime;
|
||||
tree_runtime.links.clear();
|
||||
LISTBASE_FOREACH (bNodeLink *, link, &ntree.links) {
|
||||
/* Check that the link connects nodes within this tree. */
|
||||
BLI_assert(tree_runtime.nodes_by_id.contains(link->fromnode));
|
||||
BLI_assert(tree_runtime.nodes_by_id.contains(link->tonode));
|
||||
|
||||
tree_runtime.links.append(link);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue