Fix T99905: wrong toposort when the node tree is cyclic

This commit is contained in:
Jacques Lucke 2022-07-23 14:37:39 +02:00
parent 092732d113
commit d53ea1d0af
Notes: blender-bot 2023-02-14 01:07:44 +01:00
Referenced by issue #99905, Assert on cyclic geometry nodes graph in debug mode
1 changed files with 1 additions and 0 deletions

View File

@ -522,6 +522,7 @@ static void toposort_from_start_node(const NodeTreeRef::ToposortDirection direct
/* Do a depth-first search to sort nodes topologically. */
Stack<Item, 64> nodes_to_check;
nodes_to_check.push({&start_node});
node_states[start_node.id()].is_in_stack = true;
while (!nodes_to_check.is_empty()) {
Item &item = nodes_to_check.peek();
const NodeRef &node = *item.node;