Skip to content
Permalink
Browse files

Fix crash in relief calculation when exporting distribution to csv

Fixes #19570
  • Loading branch information
nyalldawson committed Aug 9, 2018
1 parent 4c9a23e commit c860696a3ec8d23e90cebc2466975400ae301f73
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/analysis/raster/qgsrelief.cpp
@@ -522,7 +522,7 @@ bool QgsRelief::exportFrequencyDistributionToCsv( const QString &file )
for ( int j = 0; j < nCellsX; ++j )
{
elevationClass = frequencyClassForElevation( scanLine[j], minMax[0], frequencyClassRange );
if ( elevationClass >= 0 )
if ( elevationClass >= 0 && elevationClass < 252 )
{
frequency[elevationClass] += 1.0;
}

0 comments on commit c860696

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