From 551b0330f291fab89accfe2f4b4078f7144ff8ed Mon Sep 17 00:00:00 2001 From: kramm Date: Tue, 2 Dec 2008 17:09:37 +0000 Subject: [PATCH] protect against broken fonts --- lib/pdf/InfoOutputDev.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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); } -- 1.7.10.4