diff --git a/main/src/gooey/tree.rs.html b/main/src/gooey/tree.rs.html index b2dbbc0ca..33db4d0ee 100644 --- a/main/src/gooey/tree.rs.html +++ b/main/src/gooey/tree.rs.html @@ -686,7 +686,7 @@ if hovered == id { return true; } - search = data.nodes[&hovered].parent; + search = data.nodes.get(&hovered).and_then(|node| node.parent); } false @@ -799,7 +799,7 @@ let mut hierarchy = Vec::new(); while let Some(managed) = self.widget(widget, tree) { hierarchy.push(managed); - let Some(parent) = self.nodes[&widget].parent else { + let Some(parent) = self.nodes.get(&widget).and_then(|widget| widget.parent) else { break; }; widget = parent;