Don't modify RTree while iterating over it
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6582
This commit is contained in:
parent
675bb90128
commit
b7564f6f05
|
@ -387,12 +387,13 @@ bool DIALOG_CHANGE_SYMBOLS::processMatchingSymbols()
|
|||
|
||||
wxCHECK2( screen, continue );
|
||||
|
||||
std::vector<SCH_COMPONENT*> components;
|
||||
|
||||
for( SCH_ITEM* item : screen->Items().OfType( SCH_COMPONENT_T ) )
|
||||
components.push_back( static_cast<SCH_COMPONENT*>( item ) );
|
||||
|
||||
for( SCH_COMPONENT* symbol : components )
|
||||
{
|
||||
SCH_COMPONENT* symbol = dynamic_cast<SCH_COMPONENT*>( item );
|
||||
|
||||
wxCHECK2( symbol, continue );
|
||||
|
||||
if( !isMatch( symbol, &instance ) )
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Reference in New Issue