Be more careful with iterators when deleting.

Fixes https://gitlab.com/kicad/code/kicad/issues/5811
This commit is contained in:
Jeff Young 2020-09-29 14:08:10 +01:00
parent 66454ec895
commit d0773cbe89
1 changed files with 1 additions and 1 deletions

View File

@ -372,7 +372,7 @@ bool ZONE_FILLER::Fill( std::vector<ZONE_CONTAINER*>& aZones, bool aCheck, wxWin
SHAPE_POLY_SET poly = zone->GetFilledPolysList( layer ); SHAPE_POLY_SET poly = zone->GetFilledPolysList( layer );
for( int ii = 0; ii < poly.OutlineCount(); ii++ ) for( int ii = poly.OutlineCount() - 1; ii >= 0; ii-- )
{ {
std::vector<SHAPE_LINE_CHAIN>& island = poly.Polygon( ii ); std::vector<SHAPE_LINE_CHAIN>& island = poly.Polygon( ii );