Fix "Failed to execute" dialog showing up at times (#1196)

[𝘀𝗽𝗿] initial version

Created using spr 1.3.4
This commit is contained in:
Dennis Kobert 2023-05-03 19:39:02 +02:00 committed by Keavon Chambers
parent 36f24b7730
commit 47f9f7621e

View file

@ -54,7 +54,9 @@ impl DynamicExecutor {
let mut orphans = self.tree.update(proto_network, &self.typing_context)?;
core::mem::swap(&mut self.orphaned_nodes, &mut orphans);
for node_id in orphans {
self.tree.free_node(node_id)
if self.orphaned_nodes.contains(&node_id) {
self.tree.free_node(node_id)
}
}
Ok(())
}