Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[composer] Avoid crash when atlas page name field has spaces
Fix #15297
  • Loading branch information
nyalldawson committed Jul 18, 2016
1 parent 9f330fc commit 631b5e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/app/composer/qgsatlascompositionwidget.cpp
Expand Up @@ -272,8 +272,9 @@ void QgsAtlasCompositionWidget::on_mAtlasFeatureFilterCheckBox_stateChanged( int
updateAtlasFeatures();
}

void QgsAtlasCompositionWidget::pageNameExpressionChanged( const QString& expression, bool valid )
void QgsAtlasCompositionWidget::pageNameExpressionChanged( const QString&, bool valid )
{
QString expression = mPageNameWidget->asExpression();
QgsAtlasComposition* atlasMap = &mComposition->atlasComposition();
if ( !atlasMap || ( !valid && !expression.isEmpty() ) )
{
Expand Down
5 changes: 4 additions & 1 deletion src/core/composer/qgsatlascomposition.cpp
Expand Up @@ -222,7 +222,10 @@ int QgsAtlasComposition::updateFeatures()
{
nameExpression.reset( nullptr );
}
nameExpression->prepare( &expressionContext );
else
{
nameExpression->prepare( &expressionContext );
}
}

// We cannot use nextFeature() directly since the feature pointer is rewinded by the rendering process
Expand Down

0 comments on commit 631b5e8

Please sign in to comment.