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

New commits:
commit 547db8be1ab0b2987f0f06d8529eaaed2414028c
Author: Carlos Garcia Campos <[EMAIL PROTECTED]>
Date:   Tue Jan 22 13:22:20 2008 +0100

    Fix a crash when createAnnot returns NULL due to invalid annot dict.

diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 45579cc..b23be2e 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -2864,7 +2864,7 @@ Annots::Annots(XRef *xref, Catalog *catalog, Object 
*annotsObj) {
       if (annotsObj->arrayGet(i, &obj1)->isDict()) {
         annotsObj->arrayGetNF(i, &obj2);
         annot = createAnnot (xref, acroForm, obj1.getDict(), catalog, &obj2);
-        if (annot->isOk()) {
+        if (annot && annot->isOk()) {
           if (nAnnots >= size) {
             size += 16;
             annots = (Annot **)greallocn(annots, size, sizeof(Annot *));
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to