X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=pdf%2Fxpdf%2FAnnot.cc;h=42bf8499e0989fb1ff37f12b485c0d74d9a26a66;hb=f75141348caac3ba34ff3b3d8420215386f0eb02;hp=20fe24bb34b8a40edb052c2dd4c3cd91241e36ad;hpb=8122abe385056ddfb68c622d12687ba9d9ed3a21;p=evince.git diff --git a/pdf/xpdf/Annot.cc b/pdf/xpdf/Annot.cc index 20fe24bb..42bf8499 100644 --- a/pdf/xpdf/Annot.cc +++ b/pdf/xpdf/Annot.cc @@ -100,7 +100,7 @@ void Annot::draw(Gfx *gfx) { Annots::Annots(XRef *xref, Object *annotsObj) { Annot *annot; - Object obj1, obj2; + Object obj1; int size; int i; @@ -111,18 +111,16 @@ Annots::Annots(XRef *xref, Object *annotsObj) { if (annotsObj->isArray()) { for (i = 0; i < annotsObj->arrayGetLength(); ++i) { if (annotsObj->arrayGet(i, &obj1)->isDict()) { - obj1.dictLookup("Subtype", &obj2); - annot = new Annot(xref, obj1.getDict()); - if (annot->isOk()) { - if (nAnnots >= size) { - size += 16; - annots = (Annot **)grealloc(annots, size * sizeof(Annot *)); - } - annots[nAnnots++] = annot; - } else { - delete annot; + annot = new Annot(xref, obj1.getDict()); + if (annot->isOk()) { + if (nAnnots >= size) { + size += 16; + annots = (Annot **)grealloc(annots, size * sizeof(Annot *)); + } + annots[nAnnots++] = annot; + } else { + delete annot; } - obj2.free(); } obj1.free(); }