From 1be3b0eb61b702a432932bdafa9e5a58b78d393b Mon Sep 17 00:00:00 2001 From: Razin Shaikh Date: Tue, 9 Jul 2024 00:41:01 +0100 Subject: [PATCH] bug fix in update_edge_curves: if edge not in edge_map, continue --- zxlive/graphscene.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zxlive/graphscene.py b/zxlive/graphscene.py index e636b88c..118b74c3 100644 --- a/zxlive/graphscene.py +++ b/zxlive/graphscene.py @@ -180,6 +180,8 @@ def update_graph(self, new: GraphT, select_new: bool = False) -> None: def update_edge_curves(self, s: VT, t: VT) -> None: edges = [] for e in set(self.g.edges(s, t)): + if e not in self.edge_map: + continue for i in self.edge_map[e]: edges.append(self.edge_map[e][i]) midpoint_index = 0.5 * (len(edges) - 1)