Skip to content

Commit 14f0a83

Browse files
committedMay 3, 2018
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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎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)
Please sign in to comment.