Skip to content
Permalink
Browse files

Safety check for expression initialized

fixes #40762
  • Loading branch information
m-kuhn authored and nyalldawson committed Dec 28, 2020
1 parent 14136a1 commit 6d28490e272744ebafdcf7080d4fe1d789cc47e4
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 6d28490

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