From 9f98f126307aec026c6c140669987d1aa3856a0f Mon Sep 17 00:00:00 2001 From: kramm Date: Fri, 26 Oct 2007 14:38:54 +0000 Subject: [PATCH] fixed mem leak --- lib/pdf/GFXOutputDev.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/pdf/GFXOutputDev.cc b/lib/pdf/GFXOutputDev.cc index eca4d9f..e40b60d 100644 --- a/lib/pdf/GFXOutputDev.cc +++ b/lib/pdf/GFXOutputDev.cc @@ -852,7 +852,7 @@ GFXOutputDev::~GFXOutputDev() free(this->pages); this->pages = 0; } - gfxfontlist_free(this->gfxfontlist); + gfxfontlist_free(this->gfxfontlist, 1); }; GBool GFXOutputDev::upsideDown() { @@ -965,6 +965,8 @@ void GFXOutputDev::drawChar(GfxState *state, double x, double y, // check for invisible text -- this is used by Acrobat Capture if (render == RENDER_INVISIBLE) { col.a = 0; + if(!config_extrafontdata) + return; } GfxFont*font = state->getFont(); @@ -1547,6 +1549,9 @@ void GFXOutputDev::updateFont(GfxState *state) } this->current_fontinfo = this->info->getFont(id); + if(!this->current_fontinfo) { + msg(" Internal Error: no fontinfo for font %s\n", id); + } if(!this->current_fontinfo->seen) { dumpFontInfo("", gfxFont); } -- 1.7.10.4