Fix a DRC crash if a zone is flagged as filled but has 0 filled areas
Fixes #5631 https://gitlab.com/kicad/code/kicad/issues/5631
This commit is contained in:
parent
77caf50265
commit
52e272954f
|
@ -66,11 +66,17 @@ void DRC_MARKER_FACTORY::SetUnits( EDA_UNITS_T aUnits )
|
|||
MARKER_PCB* DRC_MARKER_FACTORY::NewMarker(
|
||||
TRACK* aTrack, ZONE_CONTAINER* aConflictZone, int aErrorCode ) const
|
||||
{
|
||||
SHAPE_POLY_SET* conflictOutline;
|
||||
SHAPE_POLY_SET* conflictOutline = nullptr;
|
||||
|
||||
if( aConflictZone->IsFilled() )
|
||||
if( !aConflictZone->GetIsKeepout() && aConflictZone->IsFilled() )
|
||||
{
|
||||
conflictOutline = const_cast<SHAPE_POLY_SET*>( &aConflictZone->GetFilledPolysList() );
|
||||
else
|
||||
|
||||
if( !conflictOutline ->OutlineCount() )
|
||||
conflictOutline = nullptr;
|
||||
}
|
||||
|
||||
if( !conflictOutline )
|
||||
conflictOutline = aConflictZone->Outline();
|
||||
|
||||
wxPoint markerPos;
|
||||
|
|
Loading…
Reference in New Issue