Skip to content
Permalink
Browse files

Fix potential crash in color ramp shader

Fixes #19445
  • Loading branch information
nyalldawson committed Jul 20, 2018
1 parent 34b2191 commit f3650e6bb484f3e89a27d9444e2069d0a465732c
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/core/raster/qgscolorrampshader.cpp
@@ -359,6 +359,9 @@ bool QgsColorRampShader::shade( double value, int *returnRedValue, int *returnGr
mLUTInitialized = true;
}

if ( mLUT.empty() )
return false;

// overflow indicates that value > maximum value + DOUBLE_DIFF_THRESHOLD
// that way idx can point to the last valid item
bool overflow = false;

0 comments on commit f3650e6

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