tabe            Thu Apr 23 16:26:17 2009 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/gd/libgd       gd.c 
  Log:
  MFHcheck non-null before any use.
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.c?r1=1.90.2.1.2.21.2.7&r2=1.90.2.1.2.21.2.8&diff_format=u
Index: php-src/ext/gd/libgd/gd.c
diff -u php-src/ext/gd/libgd/gd.c:1.90.2.1.2.21.2.7 
php-src/ext/gd/libgd/gd.c:1.90.2.1.2.21.2.8
--- php-src/ext/gd/libgd/gd.c:1.90.2.1.2.21.2.7 Sun Apr 12 14:43:21 2009
+++ php-src/ext/gd/libgd/gd.c   Thu Apr 23 16:26:17 2009
@@ -3880,16 +3880,15 @@
 
        /* We need the orinal image with each safe neoghb. pixel */
        srcback = gdImageCreateTrueColor (src->sx, src->sy);
+       if (srcback==NULL) {
+               return 0;
+       }
        srcback->saveAlphaFlag = 1;
        srctrans = gdImageColorAllocateAlpha(srcback, 0, 0, 0, 127);
        gdImageFill(srcback, 0, 0, srctrans);
 
        gdImageCopy(srcback, src,0,0,0,0,src->sx,src->sy);
 
-       if (srcback==NULL) {
-               return 0;
-       }
-
        f = GET_PIXEL_FUNCTION(src);
 
        for ( y=0; y<src->sy; y++) {
@@ -3946,11 +3945,10 @@
 
        /* We need the orinal image with each safe neoghb. pixel */
        srcback = gdImageCreateTrueColor (src->sx, src->sy);
-       gdImageCopy(srcback, src,0,0,0,0,src->sx,src->sy);
-
        if (srcback==NULL) {
                return 0;
        }
+       gdImageCopy(srcback, src,0,0,0,0,src->sx,src->sy);
 
        f = GET_PIXEL_FUNCTION(src);
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to