mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
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.
This commit is contained in:
parent
46f867cef4
commit
b6832916d7
@ -3253,7 +3253,7 @@ void QgisApp::setupConnections()
|
||||
} );
|
||||
|
||||
connect( QgsProject::instance(), &QgsProject::labelingEngineSettingsChanged,
|
||||
this, [ = ]
|
||||
mMapCanvas, [ = ]
|
||||
{
|
||||
mMapCanvas->setLabelingEngineSettings( QgsProject::instance()->labelingEngineSettings() );
|
||||
} );
|
||||
|
Loading…
x
Reference in New Issue
Block a user