]> git.parisson.com Git - pdf.js.git/commitdiff
added missing restore
authorsbarman <sbarman@L3CWZ5T.(none)>
Mon, 11 Jul 2011 17:29:22 +0000 (10:29 -0700)
committersbarman <sbarman@L3CWZ5T.(none)>
Mon, 11 Jul 2011 17:29:22 +0000 (10:29 -0700)
pdf.js

diff --git a/pdf.js b/pdf.js
index e51b0d37b66b81ea5280ca47a426d53ee3500080..982409bc2f6b4a394b140ea8dd08d20b6a09a9e8 100644 (file)
--- 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);