Skip to content
Permalink
Browse files

Safety check for expression initialized

  • Loading branch information
github-actions authored and nyalldawson committed Dec 28, 2020
1 parent 51d7044 commit 1353ce2860718591a2c2c75a9c3d24ed85dfa05e
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/symbology/qgsgraduatedsymbolrenderer.cpp
@@ -133,13 +133,13 @@ QVariant QgsGraduatedSymbolRenderer::valueForFeature( const QgsFeature &feature,
{
QgsAttributes attrs = feature.attributes();
QVariant value;
if ( mAttrNum < 0 || mAttrNum >= attrs.count() )
if ( mExpression )
{
value = mExpression->evaluate( &context.expressionContext() );
}
else
{
value = attrs.at( mAttrNum );
value = attrs.value( mAttrNum );
}

return value;

0 comments on commit 1353ce2

Please sign in to comment.
You can’t perform that action at this time.