diff --git a/src/analysis/processing/qgsalgorithmrasterminmax.cpp b/src/analysis/processing/qgsalgorithmrasterminmax.cpp index bb68ba681c3d..004b5604039d 100644 --- a/src/analysis/processing/qgsalgorithmrasterminmax.cpp +++ b/src/analysis/processing/qgsalgorithmrasterminmax.cpp @@ -83,7 +83,6 @@ QgsRasterMinMaxAlgorithm *QgsRasterMinMaxAlgorithm::createInstance() const bool QgsRasterMinMaxAlgorithm::prepareAlgorithm( const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessingFeedback * ) { QgsRasterLayer *layer = parameterAsRasterLayer( parameters, QStringLiteral( "INPUT" ), context ); - const int band = parameterAsInt( parameters, QStringLiteral( "BAND" ), context ); if ( !layer ) throw QgsProcessingException( invalidRasterError( parameters, QStringLiteral( "INPUT" ) ) ); @@ -94,7 +93,7 @@ bool QgsRasterMinMaxAlgorithm::prepareAlgorithm( const QVariantMap ¶meters, .arg( layer->bandCount() ) ); mInterface.reset( layer->dataProvider()->clone() ); - mHasNoDataValue = layer->dataProvider()->sourceHasNoDataValue( band ); + mHasNoDataValue = layer->dataProvider()->sourceHasNoDataValue( mBand ); mLayerWidth = layer->width(); mLayerHeight = layer->height(); mExtent = layer->extent();