Skip to content
Permalink
Browse files

Fix potential crash in color ramp shader

Fixes #19445

(cherry-picked from f3650e6)
  • Loading branch information
nyalldawson committed Jul 20, 2018
1 parent 1601e57 commit 237af60aa9d82e724eef48829337e82efbd85c4e
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/core/raster/qgscolorrampshader.cpp
@@ -346,6 +346,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 237af60

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