Skip to content

Commit b683291

Browse files
committedMay 1, 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.
1 parent 46f867c commit b683291

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
@@ -3253,7 +3253,7 @@ void QgisApp::setupConnections()
32533253
} );
32543254

32553255
connect( QgsProject::instance(), &QgsProject::labelingEngineSettingsChanged,
3256-
this, [ = ]
3256+
mMapCanvas, [ = ]
32573257
{
32583258
mMapCanvas->setLabelingEngineSettings( QgsProject::instance()->labelingEngineSettings() );
32593259
} );

0 commit comments

Comments
 (0)
Please sign in to comment.