summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2008-11-09 17:03:20 +0100
committerAlbert Astals Cid <aacid@kde.org>2008-11-09 20:56:29 +0100
commit9db1b1a4e4a58fc870368eab1e3755cdee8075fc (patch)
tree4ba0ad71cebd684b0312e3e88888a09ce1b14c32
parent70ada8a25a62e0b58d6db47c36b7ee32bbd9ddd7 (diff)
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.
-rw-r--r--poppler/Annot.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 76a7cb1e..45d063d7 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());