opnsense-ports/graphics/fly/files/patch-fly.c
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

14 lines
401 B
C

--- fly.c.orig Sun Nov 25 19:39:28 2001
+++ fly.c Mon Oct 17 23:48:51 2005
@@ -1270,6 +1270,11 @@
} else {
img_file = gdImageCreateFromPng(img_to_copy);
}
+ if (img_file == NULL) {
+ fprintf(stderr, "Error: Cannot read image file \"%s\" of type \"%s\"\n",
+ filename, imgtype == GIF ? "gif" : (imgtype == JPEG ? "jpeg" : "png"));
+ exit(1);
+ }
fclose(img_to_copy);
if( resize == 1 )