src/linetypes/circularprimitive.cpp

changeset 1400
ae83213bdd63
parent 1399
f52ea4078f5d
child 1401
59b578c77111
--- 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;

mercurial