From: kramm Date: Tue, 2 Dec 2008 17:09:37 +0000 (+0000) Subject: protect against broken fonts X-Git-Tag: release-0-9-0~728 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=551b0330f291fab89accfe2f4b4078f7144ff8ed protect against broken fonts --- diff --git a/lib/pdf/InfoOutputDev.cc b/lib/pdf/InfoOutputDev.cc index a10f4bd..d9336b2 100644 --- a/lib/pdf/InfoOutputDev.cc +++ b/lib/pdf/InfoOutputDev.cc @@ -165,8 +165,12 @@ void InfoOutputDev::updateFont(GfxState *state) state->setFont(font, 1024.0); splash->doUpdateFont(state); currentfont->splash_font = splash->getCurrentFont(); - currentfont->ascender = currentfont->splash_font->ascender; - currentfont->descender = currentfont->splash_font->descender; + if(currentfont->splash_font) { + currentfont->ascender = currentfont->splash_font->ascender; + currentfont->descender = currentfont->splash_font->descender; + } else { + currentfont->ascender = currentfont->descender = 0; + } free(id); }