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));
#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
}