From: kramm Date: Sun, 28 Nov 2004 13:52:39 +0000 (+0000) Subject: fixed crash if a standard font wasn't found. X-Git-Tag: release-0-6-3~108 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=0aa66f68ad8a25c3f10952b49f84d4c0c2a394c7 fixed crash if a standard font wasn't found. --- diff --git a/pdf2swf/SWFOutputDev.cc b/pdf2swf/SWFOutputDev.cc index eee568d..770af0c 100644 --- a/pdf2swf/SWFOutputDev.cc +++ b/pdf2swf/SWFOutputDev.cc @@ -1449,6 +1449,10 @@ char* SWFOutputDev::substituteFont(GfxFont*gfxFont, char* oldname) fontname = "Times-Roman"; } filename = searchFont(fontname); + if(!filename) { + msg(" Couldn't find font %s- did you install the default fonts?"); + return 0; + } if(substitutepos>=sizeof(substitutesource)/sizeof(char*)) { msg(" Too many fonts in file.");