Skip to content
Permalink
Browse files

Fix crash when closing a project with layers in edition (fixes #16771)

Delete layers from project & not through layers tree, avoiding
double deletion of layers.
  • Loading branch information
nouanda authored and nyalldawson committed Aug 27, 2017
1 parent 5e94546 commit 37052db39aca4824532d71dd182b8d2a9d634d05
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/qgsproject.cpp
@@ -492,8 +492,6 @@ void QgsProject::clear()
mMapThemeCollection.reset( new QgsMapThemeCollection( this ) );
emit mapThemeCollectionChanged();

mRootGroup->clear();

mLabelingEngineSettings->clear();

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

removeAllMapLayers();
mRootGroup->clear();

setDirty( false );
}

0 comments on commit 37052db

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