From b0824e1626170d10275b5177b22d3694d950d3ef Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Mon, 3 Mar 2014 17:16:34 +0100 Subject: [PATCH] Prevent circular reference when checking for blend modes (issue 4370) --- src/core/evaluator.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } }