Guard against UNDEFINED_LAYER in GetLayerSet

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16230
This commit is contained in:
Jon Evans 2023-11-30 17:08:37 -05:00
parent 12d787ecc0
commit 1ff3b5a437
1 changed files with 3 additions and 0 deletions

View File

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