summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2002-10-16 22:34:44 +0000
committerRasmus Lerdorf <rasmus@php.net>2002-10-16 22:34:44 +0000
commitebfd9aaa47edcbee45f5853b25f7ccd012c78113 (patch)
tree74cfbfb485b2dd2d0509c937f2ef9a33c1f982a7
parent8361687a4a077f2776736fc1b9f8552285d2d780 (diff)
downloadphp-git-ebfd9aaa47edcbee45f5853b25f7ccd012c78113.tar.gz
Fix for bug #19941
-rw-r--r--ext/gd/libgd/gd_topal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/gd/libgd/gd_topal.c b/ext/gd/libgd/gd_topal.c
index 392e93419e..7e2de25fc5 100644
--- a/ext/gd/libgd/gd_topal.c
+++ b/ext/gd/libgd/gd_topal.c
@@ -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;