--- 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;