Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=xbdmenu.git;a=commitdiff;h=93fb59da0e60183627c71aa25ea4e2b3983b4fcc
commit 93fb59da0e60183627c71aa25ea4e2b3983b4fcc Author: James Buren <[email protected]> Date: Sun Mar 15 16:31:40 2009 -0500 mem.c * adjust load_image to return NULL if file could not be opened diff --git a/mem.c b/mem.c index 4d058f5..bcff0ca 100644 --- a/mem.c +++ b/mem.c @@ -70,6 +70,8 @@ extern gdImagePtr load_image(const char *fn) { FILE *file = zfopen(fn,"rb"); gdImagePtr image = NULL; + if(file==NULL) + return(image); if(strstr(fn,".gif")!=NULL) image = gdImageCreateFromGif(file); else if(strstr(fn,".png")!=NULL) _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
