From 248404a0d16969f97a230d18da42d79d96775ac7 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 4 Aug 2023 13:58:11 -0700 Subject: [PATCH] Better fix for #15217 Rather than rely on a quirk, we avoid the modified structure Fixes https://gitlab.com/kicad/code/kicad/-/issues/15217 --- eeschema/connection_graph.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eeschema/connection_graph.cpp b/eeschema/connection_graph.cpp index 1f4a68a4f0..9be2545d17 100644 --- a/eeschema/connection_graph.cpp +++ b/eeschema/connection_graph.cpp @@ -2430,7 +2430,9 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph, boo // member to have the correct connection info if( conn->IsBus() && !stale_bus_members.empty() ) { - for( SCH_CONNECTION* stale_member : stale_bus_members ) + std::unordered_set cached_members = stale_bus_members; + + for( SCH_CONNECTION* stale_member : cached_members ) { for( CONNECTION_SUBGRAPH* subgraph : visited ) {