X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fpdf%2FInfoOutputDev.cc;h=d9336b23e86b5fa1e5ee86750dc50b77e265b8e8;hp=a10f4bd2e0272469f506943533759c0879328a10;hb=551b0330f291fab89accfe2f4b4078f7144ff8ed;hpb=e0a702738ce558dd303389b345ec5349f39a5ccf 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); }