7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-18 19:09:17 +00:00

Don't set board layers without board

When loading footprints, we may have undefined layers, they should not
be set unless we have a board

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20625
This commit is contained in:
Seth Hillbrand 2025-04-11 15:12:00 -07:00
parent 9228369617
commit 7d195b73b2

View File

@ -289,7 +289,9 @@ std::vector<PCB_LAYER_ID> ALTIUM_PCB::GetKicadLayersToIterate( ALTIUM_LAYER aAlt
}
klayer = Eco1_User;
m_board->SetEnabledLayers( m_board->GetEnabledLayers() | LSET( { klayer } ) );
if( m_board )
m_board->SetEnabledLayers( m_board->GetEnabledLayers() | LSET( { klayer } ) );
}
return { klayer };