Skip to content
Snippets Groups Projects
Commit 6a4565ca authored by Tom Fischer's avatar Tom Fischer
Browse files

fixed a possible memory leak

parent 238605d9
No related branches found
No related tags found
No related merge requests found
...@@ -592,8 +592,12 @@ bool readGLIFileV4(const std::string& fname, GEOObjects* geo, std::string& uniqu ...@@ -592,8 +592,12 @@ bool readGLIFileV4(const std::string& fname, GEOObjects* geo, std::string& uniqu
if (!ply_vec->empty()) if (!ply_vec->empty())
geo->addPolylineVec(ply_vec, unique_name, ply_names); // KR: insert into GEOObjects if not empty geo->addPolylineVec(ply_vec, unique_name, ply_names); // KR: insert into GEOObjects if not empty
else
delete ply_vec;
if (!sfc_vec->empty()) if (!sfc_vec->empty())
geo->addSurfaceVec(sfc_vec, unique_name, sfc_names); // KR: insert into GEOObjects if not empty geo->addSurfaceVec(sfc_vec, unique_name, sfc_names); // KR: insert into GEOObjects if not empty
else
delete sfc_vec;
if (errors.empty()) if (errors.empty())
return true; return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment