From 3b0af960dd90af15cbe32e2fd7642408031e70f5 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Tue, 26 May 2020 11:07:16 +1000 Subject: [PATCH] Fix incorrect warning message when turning off atlas preview --- src/app/layout/qgslayoutdesignerdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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