diff --git a/src/core/evaluator.js b/src/core/evaluator.js index 2cf00d0bb..256a38ecd 100644 --- a/src/core/evaluator.js +++ b/src/core/evaluator.js @@ -75,7 +75,9 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { continue; } var xResources = xObject.dict.get('Resources'); - if (isDict(xResources)) { + // Only add the resource if it's different from the current one, + // otherwise we can get stuck in an infinite loop. + if (isDict(xResources) && xResources !== node) { nodes.push(xResources); } }