Skip to content

Commit

Permalink
Mask renderer: fix clone()
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Mercier committed May 23, 2014
1 parent 7231196 commit c1b4fe8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core/symbology-ng/qgsmaskrendererv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit c1b4fe8

Please sign in to comment.