blitzarx1 / egui_graphs

Interactive graph visualization widget for rust powered by egui and petgraph
https://docs.rs/crate/egui_graphs
MIT License
427 stars 29 forks source link

fix crashing edge_endpoints().unwrap() call #213

Closed XertroV closed 2 months ago

XertroV commented 2 months ago

I am not sure why, but clicking back into the egui window with a graph shown under WSL2 can cause a panic at self.g.edge_endpoints(e.id()).unwrap().

This PR changes the unwrap() to a match which continues if the value is None.

blitzarx1 commented 2 months ago

Yep, sounds strange. Anyway less unwraps is better :)