Skip to content

Commit

Permalink
[bugfix] SingleBandPseudoColor crashes when min or max is NaN
Browse files Browse the repository at this point in the history
.. in styling dock

Fixes #16794
  • Loading branch information
elpaso committed Sep 26, 2017
1 parent ce11ebb commit 50b663e
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 50b663e

Please sign in to comment.