Browse Source

Ensure a layer exists before using it.

Fixes #15170
https://gitlab.com/kicad/code/kicad/-/issues/15170
newinvert
jean-pierre charras 2 years ago
parent
commit
74c5f5a054
  1. 5
      pcbnew/pcb_painter.cpp

5
pcbnew/pcb_painter.cpp

@ -248,7 +248,10 @@ COLOR4D PCB_RENDER_SETTINGS::GetColor( const VIEW_ITEM* aItem, int aLayer ) cons
else if( GetActiveLayer() == B_Mask && visibleLayers.test( B_Mask ) )
aLayer = B_Mask;
else if( ( visibleLayers & LSET::AllCuMask() ).none() )
aLayer = visibleLayers.Seq().back();
{
if( visibleLayers.any() )
aLayer = visibleLayers.Seq().back();
}
}
}

Loading…
Cancel
Save