]> www.fi.muni.cz Git - evince.git/blobdiff - pdf/xpdf/Outline.cc
Changed value according to USE_ANNOTS_VIEW cond in order to include
[evince.git] / pdf / xpdf / Outline.cc
index 256d38d4ba7ca62988f71a2cb14cb9c0baafce64..23efed18aa2b9ba30d004bea7355fa2237220ff5 100644 (file)
@@ -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;