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
  • Loading branch information
nyalldawson committed May 26, 2020
1 parent 6a4d227 commit 3b0af96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/layout/qgslayoutdesignerdialog.cpp
Expand Up @@ -4461,7 +4461,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 3b0af96

Please sign in to comment.