diff --git a/src/plugins/runner/shp/ShpRunner.cpp b/src/plugins/runner/shp/ShpRunner.cpp index de605f48c8dfbea2493919c44046a0f9926e0695..6670d255f2ed9bb11a86d4c006fbc428dd713861 100644 --- a/src/plugins/runner/shp/ShpRunner.cpp +++ b/src/plugins/runner/shp/ShpRunner.cpp @@ -82,7 +82,7 @@ GeoDataDocument *ShpRunner::parseFile(const QString &fileName, DocumentRole role placemark = new GeoDataPlacemark; document->append( placemark ); - SHPObject *shape = SHPReadObject( handle, i ); + std::unique_ptr shape(SHPReadObject( handle, i ), &SHPDestroyObject); if (nameField != -1) { const char* info = DBFReadStringAttribute( dbfhandle, i, nameField ); // TODO: defaults to utf-8 encoding, but could be also something else, optionally noted in a .cpg file