Fix #115782: crash when dangling reroute has outgoing link into repeat zone

Now, such links are treated similar to muted links. Links coming from dangling
reroutes are not added to the set or border links anymore. They should be
ignored by evaluation systems.
This commit is contained in:
Jacques Lucke
2024-01-09 12:43:24 +01:00
parent a7f4f86fe5
commit 653e01092f
2 changed files with 8 additions and 1 deletions

View File

@@ -33,7 +33,11 @@ class bNodeTreeZone {
Vector<bNodeTreeZone *> child_zones;
/** Direct children nodes excluding nodes that belong to child zones. */
Vector<const bNode *> child_nodes;
/** Links that enter the zone through the zone border. */
/**
* Links that enter the zone through the zone border and carry information. This excludes muted
* and unavailable links as well as links that are dangling because they are only connected to a
* reroute.
*/
Vector<const bNodeLink *> border_links;
bool contains_node_recursively(const bNode &node) const;

View File

@@ -196,6 +196,9 @@ static void update_zone_border_links(const bNodeTree &tree, bNodeTreeZones &tree
if (link->is_muted()) {
continue;
}
if (bke::nodeIsDanglingReroute(&tree, link->fromnode)) {
continue;
}
bNodeTreeZone *from_zone = const_cast<bNodeTreeZone *>(
tree_zones.get_zone_by_socket(*link->fromsock));
bNodeTreeZone *to_zone = const_cast<bNodeTreeZone *>(