Skip to content
Permalink
Browse files

Fix leaks in QgsInvertedPolygonRenderer

  • Loading branch information
nyalldawson committed Aug 25, 2015
1 parent cbd2058 commit 8ca4b6751c7ebd21d24706d0dea6752d7a491515
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/core/symbology-ng/qgsinvertedpolygonrenderer.cpp
@@ -337,7 +337,7 @@ QgsFeatureRendererV2* QgsInvertedPolygonRenderer::clone() const
}
else
{
newRenderer = new QgsInvertedPolygonRenderer( mSubRenderer->clone() );
newRenderer = new QgsInvertedPolygonRenderer( mSubRenderer.data() );
}
newRenderer->setPreprocessingEnabled( preprocessingEnabled() );
copyPaintEffect( newRenderer );
@@ -351,7 +351,9 @@ QgsFeatureRendererV2* QgsInvertedPolygonRenderer::create( QDomElement& element )
QDomElement embeddedRendererElem = element.firstChildElement( "renderer-v2" );
if ( !embeddedRendererElem.isNull() )
{
r->setEmbeddedRenderer( QgsFeatureRendererV2::load( embeddedRendererElem ) );
QgsFeatureRendererV2* renderer = QgsFeatureRendererV2::load( embeddedRendererElem );
r->setEmbeddedRenderer( renderer );
delete renderer;
}
r->setPreprocessingEnabled( element.attribute( "preprocessing", "0" ).toInt() == 1 );
return r;

0 comments on commit 8ca4b67

Please sign in to comment.
You can’t perform that action at this time.