From 788c607d4793a1e9b90b67f88e54c121c0e3ea18 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 2 Feb 2022 20:40:54 +0100 Subject: [PATCH] EDA_SHAPE::MakeEffectiveShapes(): protect against empty polygons. Fixes #10713 https://gitlab.com/kicad/code/kicad/issues/10713 --- common/eda_shape.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/eda_shape.cpp b/common/eda_shape.cpp index 33511dac43..53a51bce81 100644 --- a/common/eda_shape.cpp +++ b/common/eda_shape.cpp @@ -1140,6 +1140,9 @@ std::vector EDA_SHAPE::MakeEffectiveShapes() const case SHAPE_T::POLY: { + if( GetPolyShape().OutlineCount() == 0 ) // malformed/empty polygon + break; + SHAPE_LINE_CHAIN l = GetPolyShape().COutline( 0 ); l.Rotate( -DECIDEG2RAD( getParentOrientation() ) );