Skip to content
Permalink
Browse files

Fix crash on exit

Because the map canvas is destroyed before the project instance,
and QgsProject emits the labelingEngineSettingsChange signal
during its destructor, the lambda slot was getting executed
with a dangling map canvas pointer.

Correctly set the receiver in the lambda connection instead
so that the connection gets destroyed along with the canvas.
  • Loading branch information
nyalldawson committed May 1, 2018
1 parent 46f867c commit b6832916d784b2504e60b341f8a0e66c9b7acb1c
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/app/qgisapp.cpp
@@ -3253,7 +3253,7 @@ void QgisApp::setupConnections()
} );

connect( QgsProject::instance(), &QgsProject::labelingEngineSettingsChanged,
this, [ = ]
mMapCanvas, [ = ]
{
mMapCanvas->setLabelingEngineSettings( QgsProject::instance()->labelingEngineSettings() );
} );

0 comments on commit b683291

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