Skip to content

Commit f3650e6

Browse files
committedJul 20, 2018
Fix potential crash in color ramp shader
Fixes #19445
1 parent 34b2191 commit f3650e6

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
@@ -359,6 +359,9 @@ bool QgsColorRampShader::shade( double value, int *returnRedValue, int *returnGr
359359
mLUTInitialized = true;
360360
}
361361

362+
if ( mLUT.empty() )
363+
return false;
364+
362365
// overflow indicates that value > maximum value + DOUBLE_DIFF_THRESHOLD
363366
// that way idx can point to the last valid item
364367
bool overflow = false;

0 commit comments

Comments
 (0)
Please sign in to comment.