Skip to content

Commit c860696

Browse files
committedAug 9, 2018
Fix crash in relief calculation when exporting distribution to csv
Fixes #19570
1 parent 4c9a23e commit c860696

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/analysis/raster/qgsrelief.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ bool QgsRelief::exportFrequencyDistributionToCsv( const QString &file )
522522
for ( int j = 0; j < nCellsX; ++j )
523523
{
524524
elevationClass = frequencyClassForElevation( scanLine[j], minMax[0], frequencyClassRange );
525-
if ( elevationClass >= 0 )
525+
if ( elevationClass >= 0 && elevationClass < 252 )
526526
{
527527
frequency[elevationClass] += 1.0;
528528
}

0 commit comments

Comments
 (0)
Please sign in to comment.