Skip to content

Commit 50f3a32

Browse files
committed
Fix crash when exporting reports
1 parent 403a2e3 commit 50f3a32

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/app/layout/qgslayoutdesignerdialog.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4475,9 +4475,16 @@ void QgsLayoutDesignerDialog::setLastExportPath( const QString &path ) const
44754475

44764476
bool QgsLayoutDesignerDialog::checkBeforeExport()
44774477
{
4478-
QgsLayoutValidityCheckContext context( mLayout );
4479-
return QgsValidityCheckResultsWidget::runChecks( QgsAbstractValidityCheck::TypeLayoutCheck, &context, tr( "Checking Layout" ),
4480-
tr( "The layout generated the following warnings. Please review and address these before proceeding with the layout export." ), this );
4478+
if ( mLayout )
4479+
{
4480+
QgsLayoutValidityCheckContext context( mLayout );
4481+
return QgsValidityCheckResultsWidget::runChecks( QgsAbstractValidityCheck::TypeLayoutCheck, &context, tr( "Checking Layout" ),
4482+
tr( "The layout generated the following warnings. Please review and address these before proceeding with the layout export." ), this );
4483+
}
4484+
else
4485+
{
4486+
return true;
4487+
}
44814488
}
44824489

44834490
void QgsLayoutDesignerDialog::updateWindowTitle()

0 commit comments

Comments
 (0)