From 6f74406a2cc2f2099d7940ea3e916a2c94a6e43b Mon Sep 17 00:00:00 2001 From: sbarman Date: Mon, 11 Jul 2011 10:29:22 -0700 Subject: [PATCH] added missing restore --- pdf.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pdf.js b/pdf.js index e51b0d37b..982409bc2 100644 --- a/pdf.js +++ b/pdf.js @@ -4251,8 +4251,10 @@ var CanvasGraphics = (function() { var height = botRight[1] - topLeft[1]; // TODO: hack to avoid OOM, remove then pattern code is fixed - if (Math.abs(width) > 8192 || Math.abs(height) > 8192) + if (Math.abs(width) > 8192 || Math.abs(height) > 8192) { + this.restore(); return 'hotpink'; + } var tmpCanvas = new this.ScratchCanvas(width, height);