Use the common subset of nets for local update

When adding new data, we may have differing sizes of the dynamic
ratsnest and our local copy, so ensure that we are only referencing
elements that exist in both
This commit is contained in:
Seth Hillbrand 2023-02-10 12:49:23 -08:00
parent 89429996da
commit 6fb9d190ac
1 changed files with 2 additions and 1 deletions

View File

@ -364,8 +364,9 @@ void CONNECTIVITY_DATA::ComputeLocalRatsnest( const std::vector<BOARD_ITEM*>& aI
};
thread_pool& tp = GetKiCadThreadPool();
size_t num_nets = std::min( m_nets.size(), aDynamicData->m_nets.size() );
tp.push_loop( 1, aDynamicData->m_nets.size(),
tp.push_loop( 1, num_nets,
[&]( const int a, const int b)
{
for( int ii = a; ii < b; ++ii )