[poppler] poppler/poppler: TextOutputDev.cc,1.21,1.22

Jeff Muizelaar jrmuizel at kemper.freedesktop.org
Wed Sep 20 13:22:21 PDT 2006


Update of /cvs/poppler/poppler/poppler
In directory kemper:/tmp/cvs-serv9354/poppler

Modified Files:
	TextOutputDev.cc 
Log Message:
2006-09-20  Jeff Muizelaar  <jeff at infidigm.net>

	* poppler/TextOutputDev.cc: TextFontInfo stores a copy of a pointer
	to a GfxFont but does not increment the reference count. Fix the
	problem by calling incRefCnt and decRefCnt appropriately. Fixes #4649


Index: TextOutputDev.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/TextOutputDev.cc,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- TextOutputDev.cc	18 Jul 2006 21:26:57 -0000	1.21
+++ TextOutputDev.cc	20 Sep 2006 20:22:19 -0000	1.22
@@ -118,6 +118,8 @@
 
 TextFontInfo::TextFontInfo(GfxState *state) {
   gfxFont = state->getFont();
+  if (gfxFont)
+    gfxFont->incRefCnt();
 #if TEXTOUT_WORD_LIST
   fontName = (gfxFont && gfxFont->getOrigName())
                  ? gfxFont->getOrigName()->copy()
@@ -126,6 +128,8 @@
 }
 
 TextFontInfo::~TextFontInfo() {
+  if (gfxFont)
+    gfxFont->decRefCnt();
 #if TEXTOUT_WORD_LIST
   if (fontName) {
     delete fontName;



More information about the poppler mailing list