summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorPierre Joye <pierre.php@gmail.com>2013-04-04 16:56:13 +0200
committerPierre Joye <pierre.php@gmail.com>2013-04-04 16:56:13 +0200
commite5b9482db454434cfbcb698b209e9ab881c7c1cb (patch)
tree24130d08d4b85582f7db0df28d85db8548f9ca0d /examples
parente7a8d065f50f8e16a50730a1af85d407ba59dd45 (diff)
downloadlibgd-e5b9482db454434cfbcb698b209e9ab881c7c1cb.tar.gz
avoid non init'ed im if no png support
Diffstat (limited to 'examples')
-rw-r--r--examples/crop.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/crop.c b/examples/crop.c
index 0eb4182..bafb6df 100644
--- a/examples/crop.c
+++ b/examples/crop.c
@@ -33,6 +33,7 @@ gdImagePtr read_png(const char *filename)
#ifdef HAVE_LIBPNG
im = gdImageCreateFromPng(fp);
#else
+ im = NULL;
printf("No PNG support. Cannot read image.\n");
#endif
fclose(fp);