Altium: avoid crash when imported zone has no fill

Fix https://gitlab.com/kicad/code/kicad/-/issues/18025


(cherry picked from commit 4f3117aea0)

Co-authored-by: Jon Evans <jon@craftyjon.com>
This commit is contained in:
Jon Evans 2024-05-18 00:16:22 +00:00
parent fee0028ee9
commit d52e50a97a
1 changed files with 6 additions and 0 deletions

View File

@ -2669,6 +2669,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
@ -3602,6 +3605,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 );