Guard against UNDEFINED_LAYER in GetLayerSet

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16230


(cherry picked from commit 1ff3b5a437)
This commit is contained in:
Jon Evans 2023-11-30 17:08:37 -05:00
parent ef8b6bf9e1
commit 60ddafa4ff
1 changed files with 3 additions and 0 deletions

View File

@ -506,6 +506,9 @@ LSET PCB_VIA::GetLayerSet() const
{ {
LSET layermask; LSET layermask;
if( m_layer < PCBNEW_LAYER_ID_START )
return layermask;
if( GetViaType() == VIATYPE::THROUGH ) if( GetViaType() == VIATYPE::THROUGH )
layermask = LSET::AllCuMask(); layermask = LSET::AllCuMask();
else else