[poppler] Branch 'poppler-0.8' - poppler/Annot.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Sat May 3 09:29:39 PDT 2008
poppler/Annot.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 364966f37a5531503026d133f7ea48fe4b22bee2
Author: Albert Astals Cid <aacid at kde.org>
Date: Sat May 3 18:29:26 2008 +0200
A widget annot does not always belong to a form, so check before accessing the widget member
diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index e6eb087..889c06d 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -1735,7 +1735,7 @@ void AnnotWidget::initialize(XRef *xrefA, Catalog *catalog, Dict *dict) {
// Only text or choice fields needs to have appearance regenerated
// see section 8.6.2 "Variable Text" of PDFReference
regen = gFalse;
- if (widget->getType () == formText || widget->getType () == formChoice) {
+ if (widget != NULL && (widget->getType () == formText || widget->getType () == formChoice)) {
regen = form->getNeedAppearances ();
}
@@ -2577,7 +2577,7 @@ void AnnotWidget::generateFieldAppearance() {
int dashLength, ff, quadding, comb, nOptions, topIdx, i, j;
GBool modified;
- if (!widget->getField () || !widget->getField ()->getObj ()->isDict ())
+ if (widget == NULL || !widget->getField () || !widget->getField ()->getObj ()->isDict ())
return;
field = widget->getField ()->getObj ()->getDict ();
More information about the poppler
mailing list