--- a/src/linetypes/circularprimitive.cpp Sun Jun 10 17:17:42 2018 +0300 +++ b/src/linetypes/circularprimitive.cpp Sun Jun 10 21:48:58 2018 +0300 @@ -110,17 +110,15 @@ object->setVertex(i, vertex); } - LDPolygon* polygon = object->getPolygon(); + LDPolygon polygon = object->getPolygon(); - if (polygon) + if (polygon.isValid()) { if (cachedShouldInvert) - invertPolygon(*polygon); + invertPolygon(polygon); - result.append(*polygon); + result.append(polygon); } - - delete polygon; } return result;