Reverting part of cee973dc04
Iterators are invalidated by vector reallocation. We need to keep the count in the loop in order to have a valid position in the vector Fixes https://gitlab.com/kicad/code/kicad/issues/4073
This commit is contained in:
parent
e9cd9ee8ff
commit
ba8c3a5582
|
@ -1624,8 +1624,10 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph )
|
||||||
|
|
||||||
visit( aSubgraph );
|
visit( aSubgraph );
|
||||||
|
|
||||||
for( CONNECTION_SUBGRAPH* child : search_list )
|
for( unsigned i = 0; i < search_list.size(); i++ )
|
||||||
{
|
{
|
||||||
|
auto child = search_list[i];
|
||||||
|
|
||||||
visited.insert( child );
|
visited.insert( child );
|
||||||
|
|
||||||
visit( child );
|
visit( child );
|
||||||
|
|
Loading…
Reference in New Issue