1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 02:02:32 +01:00
This commit is contained in:
Rasmus Lerdorf
2002-10-16 22:34:44 +00:00
parent 8361687a4a
commit ebfd9aaa47

View File

@@ -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;