7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-07 22:05:32 +00:00

Keep the scoped copy of LSET

Attempting to fix an unknown windows crash

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19488
This commit is contained in:
Seth Hillbrand 2025-01-14 15:27:00 -08:00
parent a77c9463e4
commit c7c1748920

View File

@ -374,6 +374,7 @@ int DRC_TEST_PROVIDER_CREEPAGE::testCreepage()
size_t current = 0;
size_t total =
( netcodes.size() * ( netcodes.size() - 1 ) ) / 2 * m_board->GetCopperLayerCount();
LSET layers = m_board->GetLayerSet();
alg::for_all_pairs( netcodes.begin(), netcodes.end(),
[&]( int aNet1, int aNet2 )
@ -381,8 +382,10 @@ int DRC_TEST_PROVIDER_CREEPAGE::testCreepage()
if( aNet1 == aNet2 )
return;
for( auto it = m_board->GetLayerSet().copper_layers_begin();
it != m_board->GetLayerSet().copper_layers_end();
for( auto it = layers.copper_layers_begin();
it != layers.copper_layers_end();
++it )
{
PCB_LAYER_ID layer = *it;