Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Education
Marble
Commits
0fed6739
Commit
0fed6739
authored
Jul 11, 2020
by
Volker Krause
Browse files
Correctly destroy read SHP objects again
parent
8ba3eee2
Changes
1
Show whitespace changes
Inline
Side-by-side
src/plugins/runner/shp/ShpRunner.cpp
View file @
0fed6739
...
@@ -82,7 +82,7 @@ GeoDataDocument *ShpRunner::parseFile(const QString &fileName, DocumentRole role
...
@@ -82,7 +82,7 @@ GeoDataDocument *ShpRunner::parseFile(const QString &fileName, DocumentRole role
placemark
=
new
GeoDataPlacemark
;
placemark
=
new
GeoDataPlacemark
;
document
->
append
(
placemark
);
document
->
append
(
placemark
);
SHPObject
*
shape
=
SHPReadObject
(
handle
,
i
);
std
::
unique_ptr
<
SHPObject
,
decltype
(
&
SHPDestroyObject
)
>
shape
(
SHPReadObject
(
handle
,
i
),
&
SHPDestroyObject
);
if
(
nameField
!=
-
1
)
{
if
(
nameField
!=
-
1
)
{
const
char
*
info
=
DBFReadStringAttribute
(
dbfhandle
,
i
,
nameField
);
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
// TODO: defaults to utf-8 encoding, but could be also something else, optionally noted in a .cpg file
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment