Skip to content

Commit

Permalink
Inverted polygons: avoid inplace geometry transformation
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Mercier committed Jun 10, 2014
1 parent 85c57bc commit 5ec4fef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/symbology-ng/qgsinvertedpolygonrenderer.cpp
Expand Up @@ -183,11 +183,11 @@ bool QgsInvertedPolygonRenderer::renderFeature( QgsFeature& feature, QgsRenderCo

// update the geometry
CombinedFeature& cFeat = mFeaturesCategories[ mSymbolCategories[catId] ];
QgsGeometry* geom = feature.geometry();
if ( !geom )
if ( !feature.geometry() )
{
return false;
}
QScopedPointer<QgsGeometry> geom( new QgsGeometry( *feature.geometry() ) );

const QgsCoordinateTransform* xform = context.coordinateTransform();
if ( xform )
Expand All @@ -206,7 +206,7 @@ bool QgsInvertedPolygonRenderer::renderFeature( QgsFeature& feature, QgsRenderCo
else
{
// other features: combine them (union)
QgsGeometry* combined = cFeat.feature.geometry()->combine( geom );
QgsGeometry* combined = cFeat.feature.geometry()->combine( geom.data() );
if ( combined && combined->isGeosValid() )
{
cFeat.feature.setGeometry( combined );
Expand Down

0 comments on commit 5ec4fef

Please sign in to comment.