[poppler] poppler/Annot.cc poppler/Annot.h poppler/Form.cc
Carlos Garcia Campos
carlosgc at kemper.freedesktop.org
Sat Dec 15 06:22:26 PST 2007
poppler/Annot.cc | 7 +++++++
poppler/Annot.h | 1 +
poppler/Form.cc | 6 ++----
3 files changed, 10 insertions(+), 4 deletions(-)
New commits:
commit 796d9cb9b188a8af69d7fbf9bccbb408cbf6a71a
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date: Sat Dec 15 15:21:49 2007 +0100
Fix a crash when trying to create a temp annot with catalog = NULL
diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index c1929cf..9304189 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -308,6 +308,13 @@ AnnotBorderStyle::~AnnotBorderStyle() {
// Annot
//------------------------------------------------------------------------
+Annot::Annot(XRef *xrefA, Dict *acroForm, Dict *dict, Catalog* catalog) {
+ hasRef = false;
+ flags = flagUnknown;
+ type = typeUnknown;
+ initialize (xrefA, acroForm, dict, catalog);
+}
+
Annot::Annot(XRef *xrefA, Dict *acroForm, Dict *dict, Catalog* catalog, Object *obj) {
if (obj->isRef()) {
hasRef = gTrue;
diff --git a/poppler/Annot.h b/poppler/Annot.h
index 555285e..7a7f81d 100644
--- a/poppler/Annot.h
+++ b/poppler/Annot.h
@@ -203,6 +203,7 @@ public:
type3D // 3D 25
};
+ Annot(XRef *xrefA, Dict *acroForm, Dict *dict, Catalog* catalog);
Annot(XRef *xrefA, Dict *acroForm, Dict *dict, Catalog *catalog, Object *obj);
virtual ~Annot();
GBool isOk() { return ok; }
diff --git a/poppler/Form.cc b/poppler/Form.cc
index a0fcfa1..baddc7f 100644
--- a/poppler/Form.cc
+++ b/poppler/Form.cc
@@ -1214,11 +1214,9 @@ FormPageWidgets::FormPageWidgets (XRef *xrefA, Object* annots, unsigned int page
Object obj2;
if (annots->arrayGet(i, &obj2)->isDict()) {
Annot *ann;
- Object obj3;
- annots->arrayGetNF(i, &obj3);
- ann = new Annot(xref, NULL ,obj2.getDict(), NULL, &obj3);
+
+ ann = new Annot(xref, NULL ,obj2.getDict(), NULL);
tmp->setFontSize(ann->getFontSize());
- obj3.free();
delete ann;
}
obj2.free();
More information about the poppler
mailing list