diff --git a/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp b/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp index 045bb5d208ff0678b7ecb2234043bffec16e033e..fbae6d19668463f3d14c199bd9253effbd333692 100644 --- a/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp +++ b/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp @@ -140,15 +140,11 @@ int XmlGmlInterface::readFile(const QString &fileName) } } - if (polylines->empty()) - deletePolylines(std::move(polylines)); - else + if (!polylines->empty()) _geo_objs.addPolylineVec(std::move(polylines), gliName, std::move(ply_names)); - if (surfaces->empty()) - deleteSurfaces(std::move(surfaces)); - else + if (!surfaces->empty()) _geo_objs.addSurfaceVec(std::move(surfaces), gliName, std::move(sfc_names)); return 1;