From 0aa66f68ad8a25c3f10952b49f84d4c0c2a394c7 Mon Sep 17 00:00:00 2001 From: kramm Date: Sun, 28 Nov 2004 13:52:39 +0000 Subject: [PATCH] fixed crash if a standard font wasn't found. --- pdf2swf/SWFOutputDev.cc | 4 ++++ 1 file changed, 4 insertions(+) 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."); -- 1.7.10.4