EDA_SHAPE::MakeEffectiveShapes(): protect against empty polygons.

Fixes #10713
https://gitlab.com/kicad/code/kicad/issues/10713
This commit is contained in:
jean-pierre charras 2022-02-02 20:40:54 +01:00
parent b070914216
commit ff277a36af
1 changed files with 3 additions and 0 deletions

View File

@ -1110,6 +1110,9 @@ std::vector<SHAPE*> EDA_SHAPE::MakeEffectiveShapes( bool aEdgeOnly ) const
case SHAPE_T::POLY:
{
if( GetPolyShape().OutlineCount() == 0 ) // malformed/empty polygon
break;
SHAPE_LINE_CHAIN l = GetPolyShape().COutline( 0 );
l.Rotate( getParentOrientation() );