[poppler] Branch 'poppler-0.14' - poppler/Function.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Wed Nov 3 13:42:02 PDT 2010


 poppler/Function.cc |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 6538841ecbde2ff267dde27c065fb23b0f7470e6
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Nov 3 20:40:24 2010 +0000

    Do not add sibling children as parents
    
    Fixes c2ff94b1600b8a5841a5e4627f014560ac460f1a

diff --git a/poppler/Function.cc b/poppler/Function.cc
index a8fcd85..4ab32cb 100644
--- a/poppler/Function.cc
+++ b/poppler/Function.cc
@@ -607,18 +607,19 @@ StitchingFunction::StitchingFunction(Object *funcObj, Dict *dict, std::set<int>
     funcs[i] = NULL;
   }
   for (i = 0; i < k; ++i) {
+    std::set<int> usedParentsAux = *usedParents;
     obj1.arrayGetNF(i, &obj2);
     if (obj2.isRef()) {
       const Ref ref = obj2.getRef();
-      if (usedParents->find(ref.num) == usedParents->end()) {
-        usedParents->insert(ref.num);
+      if (usedParentsAux.find(ref.num) == usedParentsAux.end()) {
+        usedParentsAux.insert(ref.num);
         obj2.free();
         obj1.arrayGet(i, &obj2);
       } else {
         goto err2;
       }
     }
-    if (!(funcs[i] = Function::parse(&obj2, usedParents))) {
+    if (!(funcs[i] = Function::parse(&obj2, &usedParentsAux))) {
       goto err2;
     }
     if (i > 0 && (funcs[i]->getInputSize() != 1 ||


More information about the poppler mailing list