Skip to content

Commit

Permalink
avoid memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuarte47 committed Jun 13, 2014
1 parent dfa03e8 commit ea34bef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/qgspallabeling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1944,11 +1944,13 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, const QgsRenderContext
do_clip = !extentGeom->contains( geom );
if ( do_clip )
{
geom = geom->intersection( extentGeom ); // creates new geometry
if ( !geom )
QgsGeometry* clipGeom = geom->intersection( extentGeom ); // creates new geometry
if ( !clipGeom )
{
return;
}
geom = clipGeom;
clonedGeometry.reset( geom );
}
}

Expand Down

0 comments on commit ea34bef

Please sign in to comment.