From: Stanislav Malyshev Date: Mon, 21 Aug 2000 14:11:19 +0000 (+0000) Subject: Fix crash in one-argument imagecolortransparent X-Git-Tag: php-4.0.2RC1~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4bed072f118db9a8507921735a91e6fd575af6f0;p=php Fix crash in one-argument imagecolortransparent --- diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 70f06af445..582e6a28c0 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -1414,7 +1414,7 @@ PHP_FUNCTION(imagecolortransparent) ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, "Image", GDG(le_gd)); - if ((*COL) != NULL) { + if (COL != NULL && (*COL) != NULL) { col = (*COL)->value.lval; gdImageColorTransparent(im,col); }