Skip to content

Commit

Permalink
Fix crash when exporting reports
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 25, 2019
1 parent 403a2e3 commit 50f3a32
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/app/layout/qgslayoutdesignerdialog.cpp
Expand Up @@ -4475,9 +4475,16 @@ void QgsLayoutDesignerDialog::setLastExportPath( const QString &path ) const

bool QgsLayoutDesignerDialog::checkBeforeExport()
{
QgsLayoutValidityCheckContext context( mLayout );
return QgsValidityCheckResultsWidget::runChecks( QgsAbstractValidityCheck::TypeLayoutCheck, &context, tr( "Checking Layout" ),
tr( "The layout generated the following warnings. Please review and address these before proceeding with the layout export." ), this );
if ( mLayout )
{
QgsLayoutValidityCheckContext context( mLayout );
return QgsValidityCheckResultsWidget::runChecks( QgsAbstractValidityCheck::TypeLayoutCheck, &context, tr( "Checking Layout" ),
tr( "The layout generated the following warnings. Please review and address these before proceeding with the layout export." ), this );
}
else
{
return true;
}
}

void QgsLayoutDesignerDialog::updateWindowTitle()
Expand Down

0 comments on commit 50f3a32

Please sign in to comment.