Skip to content

Commit 1a5db86

Browse files
committed
[composer] Prevent atlas crash when layer has bad features (refs #11037)
1 parent 3e9ab60 commit 1a5db86

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/core/composer/qgsatlascomposition.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,12 @@ bool QgsAtlasComposition::prepareForFeature( int featureI )
372372
emit featureChanged( &mCurrentFeature );
373373
emit statusMsgChanged( QString( tr( "Atlas feature %1 of %2" ) ).arg( featureI + 1 ).arg( mFeatureIds.size() ) );
374374

375+
if ( !mCurrentFeature.isValid() )
376+
{
377+
//bad feature
378+
return true;
379+
}
380+
375381
//update composer maps
376382

377383
//build a list of atlas-enabled composer maps

0 commit comments

Comments
 (0)