cvs: gd(GD_2_0) /libgd/src/tests/freetype bug00132.c

[email protected] ("Pierre-Alain Joye") Wed, 21 Nov 2007 12:27:17 -0000
Newsgroups php.gd.cvs
Message-ID <cvspajoye1195648037@cvsserver>
pajoye		Wed Nov 21 12:27:17 2007 UTC

  Modified files:              (Branch: GD_2_0)
    /gd/libgd/src/tests/freetype	bug00132.c 
  Log:
  - MFH: add sanity check
  
  
http://cvs.php.net/viewvc.cgi/gd/libgd/src/tests/freetype/bug00132.c?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: gd/libgd/src/tests/freetype/bug00132.c
diff -u gd/libgd/src/tests/freetype/bug00132.c:1.1.2.2 gd/libgd/src/tests/freetype/bug00132.c:1.1.2.3
--- gd/libgd/src/tests/freetype/bug00132.c:1.1.2.2	Wed Nov 21 09:06:52 2007
+++ gd/libgd/src/tests/freetype/bug00132.c	Wed Nov 21 12:27:17 2007
@@ -1,4 +1,4 @@
-/* $Id: bug00132.c,v 1.1.2.2 2007/11/21 09:06:52 pajoye Exp $ */
+/* $Id: bug00132.c,v 1.1.2.3 2007/11/21 12:27:17 pajoye Exp $ */
 
 #include "gd.h"
 #include <stdio.h>
@@ -14,6 +14,10 @@
 	const char *file_exp = "bug00132_exp.png";
 
 	im = gdImageCreateTrueColor(50, 30);
+    if (!im) {
+        printf("can't get truecolor image\n");
+        return 1;
+    }
 
 	gdImageAlphaBlending(im, 0);
 	gdImageFilledRectangle(im, 0, 0, 200, 200, gdTrueColorAlpha(0, 0, 0, 127));