From 19d8dcad8b12f2da71ca78958df3c8ada31663ed Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 15 Sep 2022 18:15:48 +0100 Subject: [PATCH] Don't hang when filling degenerate zones. --- pcbnew/zone_filler.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pcbnew/zone_filler.cpp b/pcbnew/zone_filler.cpp index e0717f0501..335375cc65 100644 --- a/pcbnew/zone_filler.cpp +++ b/pcbnew/zone_filler.cpp @@ -154,6 +154,10 @@ bool ZONE_FILLER::Fill( std::vector& aZones, bool aCheck, wxWindow* aPare if( zone->GetIsRuleArea() ) continue; + // Degenerate zones will cause trouble; skip them + if( zone->GetNumCorners() <= 2 ) + continue; + if( m_commit ) m_commit->Modify( zone ); @@ -243,6 +247,7 @@ bool ZONE_FILLER::Fill( std::vector& aZones, bool aCheck, wxWindow* aPare if( zoneLock.owns_lock() ) { SHAPE_POLY_SET fillPolys; + if( !fillSingleZone( zone, layer, fillPolys ) ) return 0;