[poppler] poppler/Annot.cc

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Sun Nov 9 08:06:15 PST 2008


 poppler/Annot.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 04025c4f65bbb7e4330f6d17d917a035c0906f3d
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Sun Nov 9 17:03:20 2008 +0100

    Fix a crash when initializing an Annot with a null catalog
    
    Forms crate a temp annot just to get the font size of the form field
    passing a NULL catalog.

diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 76a7cb1..45d063d 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -958,7 +958,7 @@ void Annot::initialize(XRef *xrefA, Dict *dict, Catalog *catalog) {
   }
   obj1.free();
 
-  optContentConfig = catalog->getOptContentConfig();
+  optContentConfig = catalog ? catalog->getOptContentConfig() : NULL;
   dict->lookupNF("OC", &oc);
   if (!oc.isRef() && !oc.isNull()) {
     error (-1, "Annotation OC value not null or dict: %i", oc.getType());


More information about the poppler mailing list