diff --git a/src/app/layout/qgslayoutdesignerdialog.cpp b/src/app/layout/qgslayoutdesignerdialog.cpp index 60fa7e6d1547..0f10ec0c78da 100644 --- a/src/app/layout/qgslayoutdesignerdialog.cpp +++ b/src/app/layout/qgslayoutdesignerdialog.cpp @@ -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