[poppler] Branch 'xpdf303merge' - poppler/Link.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Mon Sep 5 11:59:04 PDT 2011


 poppler/Link.cc |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit e1c6b4c6e6df0854b040c9af9ef2d3f6789e24b2
Author: Albert Astals Cid <aacid at kde.org>
Date:   Mon Sep 5 21:02:31 2011 +0200

    xpdf303: Only call getNum if isNum

diff --git a/poppler/Link.cc b/poppler/Link.cc
index 7a59d47..bdbba57 100644
--- a/poppler/Link.cc
+++ b/poppler/Link.cc
@@ -281,11 +281,12 @@ LinkDest::LinkDest(Array *a) {
       goto err2;
     }
     kind = destFitR;
-    if (!a->get(2, &obj2)->isNum()) {
+    if (a->get(2, &obj2)->isNum()) {
+      left = obj2.getNum();
+    } else {
       error(errSyntaxWarning, -1, "Bad annotation destination position");
       kind = destFit;
     }
-    left = obj2.getNum();
     obj2.free();
     if (!a->get(3, &obj2)->isNum()) {
       error(errSyntaxWarning, -1, "Bad annotation destination position");


More information about the poppler mailing list