Skip to content
Permalink
Browse files
Mask renderer: fix clone()
  • Loading branch information
Hugo Mercier committed May 23, 2014
1 parent 7231196 commit c1b4fe85456254a01ef794e113e473e0dd9e168a
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/core/symbology-ng/qgsmaskrendererv2.cpp
@@ -208,8 +208,12 @@ QString QgsMaskRendererV2::dump() const

QgsFeatureRendererV2* QgsMaskRendererV2::clone()
{
QgsMaskRendererV2* r = new QgsMaskRendererV2( mSubRenderer.data() );
return r;
if ( mSubRenderer.isNull() )
{
return new QgsMaskRendererV2( 0 );
}
// else
return new QgsMaskRendererV2( mSubRenderer->clone() );
}

QgsFeatureRendererV2* QgsMaskRendererV2::create( QDomElement& element )

0 comments on commit c1b4fe8

Please sign in to comment.