X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=pdf%2Fxpdf%2FOutline.cc;h=23efed18aa2b9ba30d004bea7355fa2237220ff5;hb=7d180fbe736d292c594ebb7424902d69ef823ed7;hp=256d38d4ba7ca62988f71a2cb14cb9c0baafce64;hpb=6112dfe4b45b0305c7a6f61bd8a847f69f892cbb;p=evince.git diff --git a/pdf/xpdf/Outline.cc b/pdf/xpdf/Outline.cc index 256d38d4..23efed18 100644 --- a/pdf/xpdf/Outline.cc +++ b/pdf/xpdf/Outline.cc @@ -2,7 +2,7 @@ // // Outline.cc // -// Copyright 2002 Glyph & Cog, LLC +// Copyright 2002-2003 Glyph & Cog, LLC // //======================================================================== @@ -42,7 +42,7 @@ Outline::~Outline() { //------------------------------------------------------------------------ OutlineItem::OutlineItem(Dict *dict, XRef *xrefA) { - Object obj1; + Object obj1, obj2; GString *s; int i; @@ -74,10 +74,10 @@ OutlineItem::OutlineItem(Dict *dict, XRef *xrefA) { if (!dict->lookup("Dest", &obj1)->isNull()) { action = LinkAction::parseDest(&obj1); } else { - obj1.free(); - if (dict->lookup("A", &obj1)) { - action = LinkAction::parseAction(&obj1); - } + obj1.free(); + dict->lookup("A", &obj1); + if (!obj1.isNull()) + action = LinkAction::parseAction(&obj1); } obj1.free(); @@ -96,7 +96,7 @@ OutlineItem::OutlineItem(Dict *dict, XRef *xrefA) { OutlineItem::~OutlineItem() { close(); if (title) { - delete title; + gfree(title); } if (action) { delete action;