Avoid assertion on 2-layer board

New boards may have INVALID_LAYER inbetween F_Cu and B_Cu in the
stackup.  Skip these and any layer values beyond what we store currently
This commit is contained in:
Seth Hillbrand 2021-09-22 12:37:17 -07:00
parent 84864351c7
commit 140e4cbe28
1 changed files with 3 additions and 0 deletions

View File

@ -295,6 +295,9 @@ std::vector<BOARD_ITEM*> DRAWING_TOOL::DrawSpecificationStackup( const wxPoint&
for( i = 0; i < stackup.GetCount(); i++ )
{
if( !IsValidLayer( layers.at( i )->GetBrdLayerId() ) )
continue;
for( j = 0; j < layers.at( i )->GetSublayersCount(); j++ )
{
// Layer names are empty until we close at least once the board setup dialog.