src/lddocument.cpp

changeset 1400
ae83213bdd63
parent 1394
8d9d0532b3df
child 1424
737df8e904af
--- a/src/lddocument.cpp	Sun Jun 10 17:17:42 2018 +0300
+++ b/src/lddocument.cpp	Sun Jun 10 21:48:58 2018 +0300
@@ -464,13 +464,10 @@
 				continue;
 			}
 
-			LDPolygon* data = obj->getPolygon();
+			LDPolygon data = obj->getPolygon();
 
-			if (data)
-			{
-				m_polygonData << *data;
-				delete data;
-			}
+			if (data.isValid())
+				m_polygonData << data;
 		}
 
 		m_needsRecache = false;

mercurial