* Fix #815, gd_topal, explicit null dereferenced (kind of false positive however it does hurt to add that check) * Fix #815, != NULLmaster
parent
ebf0fb1996
commit
3f08a018cb
|
@ -1703,6 +1703,9 @@ static int gdImageTrueColorToPaletteBody (gdImagePtr oim, int dither, int colors
|
|||
select_colors (oim, nim, cquantize, colorsWanted);
|
||||
zeroHistogram (cquantize->histogram);
|
||||
if (dither) {
|
||||
if (cquantize->error_limiter == NULL) {
|
||||
goto outOfMemory;
|
||||
}
|
||||
pass2_fs_dither (oim, nim, cquantize);
|
||||
} else {
|
||||
pass2_no_dither (oim, nim, cquantize);
|
||||
|
|
Loading…
Reference in New Issue