Skip to content

Commit 14f0a83

Browse files
committed
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. (cherry-picked from b683291)
1 parent e744455 commit 14f0a83

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/app/qgisapp.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3184,7 +3184,7 @@ void QgisApp::setupConnections()
31843184
} );
31853185

31863186
connect( QgsProject::instance(), &QgsProject::labelingEngineSettingsChanged,
3187-
this, [ = ]
3187+
mMapCanvas, [ = ]
31883188
{
31893189
mMapCanvas->setLabelingEngineSettings( QgsProject::instance()->labelingEngineSettings() );
31903190
} );

0 commit comments

Comments
 (0)