Skip to content

Commit ea34bef

Browse files
committedJun 13, 2014
avoid memory leak
1 parent dfa03e8 commit ea34bef

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎src/core/qgspallabeling.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,11 +1944,13 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, const QgsRenderContext
19441944
do_clip = !extentGeom->contains( geom );
19451945
if ( do_clip )
19461946
{
1947-
geom = geom->intersection( extentGeom ); // creates new geometry
1948-
if ( !geom )
1947+
QgsGeometry* clipGeom = geom->intersection( extentGeom ); // creates new geometry
1948+
if ( !clipGeom )
19491949
{
19501950
return;
19511951
}
1952+
geom = clipGeom;
1953+
clonedGeometry.reset( geom );
19521954
}
19531955
}
19541956

0 commit comments

Comments
 (0)
Please sign in to comment.