mirror of
https://github.com/php/php-src.git
synced 2026-03-28 02:02:32 +01:00
Fix for bug #19941
This commit is contained in:
@@ -1493,7 +1493,7 @@ gdImageTrueColorToPalette (gdImagePtr im, int dither, int colorsWanted)
|
||||
my_cquantize_ptr cquantize = 0;
|
||||
int i;
|
||||
size_t arraysize;
|
||||
if (!im->trueColor)
|
||||
if (!im->trueColor || colorsWanted <= 0)
|
||||
{
|
||||
/* Nothing to do! */
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user