Skip to content

Commit

Permalink
Fix incorrect warning message when turning off atlas preview
Browse files Browse the repository at this point in the history
(cherry picked from commit 1b5e0ae)
  • Loading branch information
nyalldawson committed Jun 19, 2020
1 parent c12c1eb commit 461bec5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/layout/qgslayoutdesignerdialog.cpp
Expand Up @@ -4377,7 +4377,7 @@ void QgsLayoutDesignerDialog::atlasFeatureChanged( const QgsFeature &feature )
const QString atlasFeatureName = atlas->nameForPage( atlas->currentFeatureNumber() );
mView->setSectionLabel( atlasFeatureName );

if ( !feature.hasGeometry() || feature.geometry().isEmpty() )
if ( feature.isValid() && ( !feature.hasGeometry() || feature.geometry().isEmpty() ) )
{
// a little sanity check -- if there's any maps in this layout which are set to be atlas controlled,
// and we hit a feature with no geometry attached, then warn the user
Expand Down

0 comments on commit 461bec5

Please sign in to comment.