Skip to content

Commit

Permalink
Fix crash when closing QGIS with open layout designer windows
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nyalldawson authored and nirvn committed Jun 10, 2019
1 parent d106406 commit e3b4182
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/layout/qgslayoutdesignerdialog.cpp
Expand Up @@ -935,7 +935,7 @@ void QgsLayoutDesignerDialog::setMasterLayout( QgsMasterLayoutInterface *layout

QObject *obj = dynamic_cast< QObject * >( mMasterLayout );
if ( obj )
connect( obj, &QObject::destroyed, [ = ]
connect( obj, &QObject::destroyed, this, [ = ]
{
this->close();
QgsApplication::sendPostedEvents( nullptr, QEvent::DeferredDelete );
Expand Down

0 comments on commit e3b4182

Please sign in to comment.