X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=pdf2swf%2FSWFOutputDev.cc;h=41eda262852cb5448e45e0d7bf4238e6becb3138;hb=c109dbef8cc11dd5de7292ba21c0628d1dc31857;hp=5d53fbdf8c0c0d5f505c58c540b63ebaa0b51375;hpb=d057345154a776b29f6842cf1b26714c491e0180;p=swftools.git diff --git a/pdf2swf/SWFOutputDev.cc b/pdf2swf/SWFOutputDev.cc index 5d53fbd..41eda26 100644 --- a/pdf2swf/SWFOutputDev.cc +++ b/pdf2swf/SWFOutputDev.cc @@ -973,10 +973,12 @@ char* SWFOutputDev::substituteFont(GfxFont*gfxFont, char* oldname) logf(" Too many fonts in file."); exit(1); } - substitutesource[substitutepos] = oldname; - substitutetarget[substitutepos] = fontname; - logf(" substituting %s -> %s", oldname, fontname); - substitutepos ++; + if(oldname) { + substitutesource[substitutepos] = oldname; + substitutetarget[substitutepos] = fontname; + logf(" substituting %s -> %s", oldname, fontname); + substitutepos ++; + } return fontname; } @@ -1080,6 +1082,7 @@ void SWFOutputDev::updateFont(GfxState *state) if(t1id<0) { showFontError(gfxFont,0); + return; } /* we may have done some substitutions here, so check