Skip to content

Commit 43e6ee0

Browse files
committedJun 7, 2019
Fix crash when closing QGIS with open layout designer windows
Qt connections to a lambda ALWAYS should have a context object, or the connection lasts forever, even after the object which made the connection is deleted.
1 parent a707346 commit 43e6ee0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/app/layout/qgslayoutdesignerdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@ void QgsLayoutDesignerDialog::setMasterLayout( QgsMasterLayoutInterface *layout
966966

967967
QObject *obj = dynamic_cast< QObject * >( mMasterLayout );
968968
if ( obj )
969-
connect( obj, &QObject::destroyed, [ = ]
969+
connect( obj, &QObject::destroyed, this, [ = ]
970970
{
971971
this->close();
972972
QgsApplication::sendPostedEvents( nullptr, QEvent::DeferredDelete );

0 commit comments

Comments
 (0)
Please sign in to comment.