Fix crash when a DRC rule specifies an empty zone as a keepout.

This commit is contained in:
Jeff Young 2020-08-08 16:22:50 +01:00
parent 98237e96a4
commit 02bf5d27df
1 changed files with 3 additions and 2 deletions

View File

@ -1257,13 +1257,14 @@ const int UI_EPSILON = Mils2iu( 5 );
wxPoint DRC::GetLocation( TRACK* aTrack, ZONE_CONTAINER* aConflictZone )
{
SHAPE_POLY_SET* conflictOutline;
SHAPE_POLY_SET* conflictOutline = nullptr;
PCB_LAYER_ID l = aTrack->GetLayer();
if( aConflictZone->IsFilled() && aConflictZone->HasFilledPolysForLayer( l ) )
conflictOutline = const_cast<SHAPE_POLY_SET*>( &aConflictZone->GetFilledPolysList( l ) );
else
if( !conflictOutline || conflictOutline->IsEmpty() )
conflictOutline = aConflictZone->Outline();
wxPoint pt1 = aTrack->GetPosition();