Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix crash when exporting reports
(cherry picked from commit 50f3a32)
  • Loading branch information
nyalldawson committed Feb 25, 2019
1 parent 6b6a1ba commit d7ba8b9
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 d7ba8b9

Please sign in to comment.