Skip to content
Permalink
Browse files
Fix crash in relief calculation when exporting distribution to csv
Fixes #19570

(cherry-picked from c860696)
  • Loading branch information
nyalldawson committed Aug 10, 2018
1 parent a47682f commit 1fe1a99eff594c6642cb08bebb64f3f2424a7c41
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 1fe1a99

Please sign in to comment.