Skip to content

Commit

Permalink
Update src/core/expression/qgsexpressionfunction.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Julien Cabieces <julien.cabieces@oslandia.com>
  • Loading branch information
elpaso and troopa81 committed Nov 10, 2022
1 parent 66e5a4e commit 0a83e2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/expression/qgsexpressionfunction.cpp
Expand Up @@ -1706,7 +1706,7 @@ static QVariant fcnRasterAttributes( const QVariantList &values, const QgsExpres
return QVariant();
}

int bandNb = QgsExpressionUtils::getNativeIntValue( values.at( 1 ), parent );
const int bandNb = QgsExpressionUtils::getNativeIntValue( values.at( 1 ), parent );
if ( bandNb < 1 || bandNb > layer->bandCount() )
{
parent->setEvalErrorString( QObject::tr( "Function `raster_attributes` requires a valid raster band number." ) );
Expand Down

0 comments on commit 0a83e2c

Please sign in to comment.