Altium: avoid crash when imported zone has no fill

Fix https://gitlab.com/kicad/code/kicad/-/issues/18025
This commit is contained in:
Jon Evans 2024-05-17 20:15:51 -04:00
parent af5ed5a118
commit 4f3117aea0
1 changed files with 6 additions and 0 deletions

View File

@ -2783,6 +2783,9 @@ void ALTIUM_PCB::ConvertArcs6ToBoardItem( const AARC6& aElem, const int aPrimiti
if( klayer == UNDEFINED_LAYER )
return; // Just skip it for now. Users can fill it themselves.
if( !zone->HasFilledPolysForLayer( klayer ) )
return;
SHAPE_POLY_SET* fill = zone->GetFill( klayer );
// This is not the actual board item. We can use it to create the polygon for the region
@ -3715,6 +3718,9 @@ void ALTIUM_PCB::ConvertTracks6ToBoardItem( const ATRACK6& aElem, const int aPri
if( klayer == UNDEFINED_LAYER )
return; // Just skip it for now. Users can fill it themselves.
if( !zone->HasFilledPolysForLayer( klayer ) )
return;
SHAPE_POLY_SET* fill = zone->GetFill( klayer );
PCB_SHAPE shape( nullptr, SHAPE_T::SEGMENT );