Skip to content

Commit

Permalink
Fix memory leak when cloning vector layers
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 29, 2017
1 parent 48db8ec commit fb76383
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/core/qgsvectorlayer.cpp
Expand Up @@ -247,8 +247,7 @@ QgsVectorLayer *QgsVectorLayer::clone() const

if ( diagramLayerSettings() )
{
QgsDiagramLayerSettings *dls = new QgsDiagramLayerSettings( *diagramLayerSettings() );
layer->setDiagramLayerSettings( *dls );
layer->setDiagramLayerSettings( *diagramLayerSettings() );
}

for ( int i = 0; i < fields().count(); i++ )
Expand Down

0 comments on commit fb76383

Please sign in to comment.