After removing items from the conn list, check valid

When cancelling, we mark elements invalid if they are removed from the
connectivity list.  Be cause when iterating through the list again.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20566
This commit is contained in:
Seth Hillbrand 2025-04-21 11:43:38 -07:00
parent 199a7a34ea
commit 9d1142839a

View File

@ -945,7 +945,7 @@ void CN_CONNECTIVITY_ALGO::updateJumperPads()
for( CN_ITEM* item : m_itemList )
{
if( item->Parent()->Type() != PCB_PAD_T )
if( !item->Valid() || item->Parent()->Type() != PCB_PAD_T )
continue;
auto pad = static_cast<const PAD*>( item->Parent() );