From 9494bb15a406f6fd37d1a149f99e5ca3c6792cd7 Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <dmitri.naumov@ufz.de>
Date: Thu, 4 May 2017 13:33:39 +0200
Subject: [PATCH] [GL] Remove unnecessary call to deletePolylines.

If empty, no deletion is done anyway.
---
 GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp b/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp
index 045bb5d208f..fbae6d19668 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;
-- 
GitLab