From 1ab2c21b8173b921d01d491db36a98c6c841a975 Mon Sep 17 00:00:00 2001 From: Austin Hicks Date: Fri, 8 Mar 2024 18:14:12 -0800 Subject: [PATCH] Synthizer: fix a typo that would crash the graph if a node with incoming edges deregisters before the incoming node Simple backwards field, the other end of tan incoming edge is the outgoing end --- crates/synthizer/src/data_structures/graph.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/synthizer/src/data_structures/graph.rs b/crates/synthizer/src/data_structures/graph.rs index 3aab589..d72f70f 100644 --- a/crates/synthizer/src/data_structures/graph.rs +++ b/crates/synthizer/src/data_structures/graph.rs @@ -64,7 +64,7 @@ impl Graph { // The outgoing set points at unique incoming nodes. .map(|x| x.incoming_node) // The incoming set points at unique outgoing nodes. - .chain(node.incoming.into_iter().map(|x| x.incoming_node)) + .chain(node.incoming.into_iter().map(|x| x.outgoing_node)) { let node = self.nodes.get_mut(&id).expect("Node must be present"); node.outgoing