X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fmodules%2Fswffont.c;h=9a572e1f7e66bbe520b9522c910d28d657136a74;hb=b0a6c2bc243ef9186ca87db478f502df073c4ba3;hp=21a19e6a212ee5bf780f770e3983a1552c0af97e;hpb=fa9f93ed6eac01d72ba26e2e72d2ceee78ffd3f9;p=swftools.git diff --git a/lib/modules/swffont.c b/lib/modules/swffont.c index 21a19e6..9a572e1 100644 --- a/lib/modules/swffont.c +++ b/lib/modules/swffont.c @@ -300,7 +300,10 @@ SWFFONT* swf_LoadT1Font(char*filename) memset(font, 0, sizeof(SWFFONT)); font->version = 2; - font->name = (U8*)strdup(fontname); + if(fontname) + font->name = (U8*)strdup(fontname); + else + font->name = 0; font->layout = (SWFLAYOUT*)malloc(sizeof(SWFLAYOUT)); memset(font->layout, 0, sizeof(SWFLAYOUT)); @@ -439,7 +442,7 @@ SWFFONT* swf_LoadFont(char*filename) #elif defined(HAVE_T1LIB) return swf_LoadT1Font(filename); #else - fprintf(stderr, "Error: Neither T1lib nor FreeType support compiled in. Could not load %s\n", infile); + fprintf(stderr, "Error: Neither T1lib nor FreeType support compiled in. Could not load %s\n", filename); return 0; #endif }