summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2010-11-03 20:40:24 +0000
committerAlbert Astals Cid <aacid@kde.org>2010-11-03 20:41:50 +0000
commit6538841ecbde2ff267dde27c065fb23b0f7470e6 (patch)
tree8a3b8602ff2b02973a5ec78541f63ec665e1303a
parent131b3d34ee85ad1f37041bae36dd93da2ff09a26 (diff)
Do not add sibling children as parents
-rw-r--r--poppler/Function.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/poppler/Function.cc b/poppler/Function.cc
index a8fcd850..4ab32cb8 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 ||