Skip to content

Commit 237af60

Browse files
committedJul 20, 2018
Fix potential crash in color ramp shader
Fixes #19445 (cherry-picked from f3650e6)
1 parent 1601e57 commit 237af60

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎src/core/raster/qgscolorrampshader.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,9 @@ bool QgsColorRampShader::shade( double value, int *returnRedValue, int *returnGr
346346
mLUTInitialized = true;
347347
}
348348

349+
if ( mLUT.empty() )
350+
return false;
351+
349352
// overflow indicates that value > maximum value + DOUBLE_DIFF_THRESHOLD
350353
// that way idx can point to the last valid item
351354
bool overflow = false;

0 commit comments

Comments
 (0)
Please sign in to comment.