Skip to content

Commit

Permalink
Merge pull request #5260 from boundlessgeo/bugfix_16794_release_2_18
Browse files Browse the repository at this point in the history
[bugfix] SingleBandPseudoColor crashes when min or max is NaN
  • Loading branch information
elpaso authored Sep 26, 2017
2 parents ce11ebb + 50b663e commit faa9134
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,11 @@ void QgsSingleBandPseudoColorRendererWidget::on_mClassifyButton_clicked()
double min = lineEditValue( mMinLineEdit );
double max = lineEditValue( mMaxLineEdit );

if ( qIsNaN( min ) || qIsNaN( max ) )
{
return;
}

QScopedPointer< QgsVectorColorRampV2 > colorRamp( mColorRampComboBox->currentColorRamp() );

if ( mClassificationModeComboBox->itemData( mClassificationModeComboBox->currentIndex() ).toInt() == Continuous )
Expand Down

0 comments on commit faa9134

Please sign in to comment.