Prevent crash on unplated holes

NPTH may not be flashed on any layer, so the set-layer-visible logic
shouldn't try to determine their layer for showing.

Fixes https://gitlab.com/kicad/code/kicad/issues/11193
This commit is contained in:
Seth Hillbrand 2022-03-21 10:38:19 -07:00
parent d27d2e0ad9
commit 41c2a48802
1 changed files with 1 additions and 1 deletions

View File

@ -401,7 +401,7 @@ void DIALOG_DRC::OnDRCItemSelected( wxDataViewEvent& aEvent )
LSET layersList = getActiveLayers( it );
violationLayers &= layersList;
if( principalLayer <= UNDEFINED_LAYER )
if( principalLayer <= UNDEFINED_LAYER && layersList.count() )
principalLayer = layersList.Seq().front();
}
}