diff options
Diffstat (limited to 'src/gd_topal.c')
-rw-r--r-- | src/gd_topal.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gd_topal.c b/src/gd_topal.c index b355e2d..0fff552 100644 --- a/src/gd_topal.c +++ b/src/gd_topal.c @@ -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); |