Skip to content

Commit

Permalink
Fix possible crash when unloading project
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 19, 2019
1 parent 7ad4b05 commit c50d36c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/qgsproject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,14 +387,14 @@ QgsProject::QgsProject( QObject *parent )
connect( mLayerStore.get(), &QgsMapLayerStore::layerWasAdded, this, &QgsProject::layerWasAdded );
if ( QgsApplication::instance() )
connect( QgsApplication::instance(), &QgsApplication::requestForTranslatableObjects, this, &QgsProject::registerTranslatableObjects );
connect( mLayerStore.get(), static_cast<void ( QgsMapLayerStore::* )( const QList<QgsMapLayer *> & )>( &QgsMapLayerStore::layersWillBeRemoved ),
connect( mLayerStore.get(), static_cast<void ( QgsMapLayerStore::* )( const QList<QgsMapLayer *> & )>( &QgsMapLayerStore::layersWillBeRemoved ), this,
[ = ]( const QList<QgsMapLayer *> &layers )
{
for ( const auto &layer : layers )
disconnect( layer, &QgsMapLayer::dataSourceChanged, mRelationManager, &QgsRelationManager::updateRelationsStatus );
}
);
connect( mLayerStore.get(), static_cast<void ( QgsMapLayerStore::* )( const QList<QgsMapLayer *> & )>( &QgsMapLayerStore::layersAdded ),
connect( mLayerStore.get(), static_cast<void ( QgsMapLayerStore::* )( const QList<QgsMapLayer *> & )>( &QgsMapLayerStore::layersAdded ), this,
[ = ]( const QList<QgsMapLayer *> &layers )
{
for ( const auto &layer : layers )
Expand Down

0 comments on commit c50d36c

Please sign in to comment.