Skip to content
Permalink
Browse files

Fix crash when exporting empty report

Fixes #39086
  • Loading branch information
elpaso committed Oct 2, 2020
1 parent 7a38388 commit c45d7a4a4fb3527ab07d075630eaf414c070ba17
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/app/layout/qgslayoutdesignerdialog.cpp
@@ -274,7 +274,10 @@ class QgsAtlasExportGuard
mDialog->mIsExportingAtlas = false;

// need to update the GUI to reflect the final atlas feature
mDialog->atlasFeatureChanged( mDialog->currentLayout()->reportContext().feature() );
if ( mDialog->currentLayout() )
{
mDialog->atlasFeatureChanged( mDialog->currentLayout()->reportContext().feature() );
}
}

private:
@@ -4655,6 +4658,7 @@ void QgsLayoutDesignerDialog::toggleActions( bool layoutAvailable )
mActionExportAsPDF->setEnabled( layoutAvailable );
mActionExportAsSVG->setEnabled( layoutAvailable );
mActionPrint->setEnabled( layoutAvailable );
mActionPrintReport->setEnabled( layoutAvailable );
mActionCut->setEnabled( layoutAvailable );
mActionCopy->setEnabled( layoutAvailable );
mActionPaste->setEnabled( layoutAvailable );
@@ -4776,7 +4780,7 @@ void QgsLayoutDesignerDialog::setLastExportPath( const QString &path ) const
QgsSettings().setValue( QStringLiteral( "lastLayoutExportDir" ), savePath, QgsSettings::App );
}

bool QgsLayoutDesignerDialog::checkBeforeExport()
bool QgsLayoutDesignerDialog::checkBeforeExport( )
{
if ( mLayout )
{

0 comments on commit c45d7a4

Please sign in to comment.
You can’t perform that action at this time.