Skip to content

Commit

Permalink
Fix crash when closing a project with layers in edition (fixes #16771)
Browse files Browse the repository at this point in the history
Delete layers from project & not through layers tree, avoiding
double deletion of layers.
  • Loading branch information
c-marcel authored and nyalldawson committed Aug 27, 2017
1 parent 5e94546 commit 37052db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/qgsproject.cpp
Expand Up @@ -492,8 +492,6 @@ void QgsProject::clear()
mMapThemeCollection.reset( new QgsMapThemeCollection( this ) );
emit mapThemeCollectionChanged();

mRootGroup->clear();

mLabelingEngineSettings->clear();

mArchive->clear();
Expand All @@ -512,6 +510,8 @@ void QgsProject::clear()
writeEntry( QStringLiteral( "Measurement" ), QStringLiteral( "/AreaUnits" ), s.value( QStringLiteral( "/qgis/measure/areaunits" ) ).toString() );

removeAllMapLayers();
mRootGroup->clear();

setDirty( false );
}

Expand Down

0 comments on commit 37052db

Please sign in to comment.