From efa89ba41a0b90a4e9a3ef2de711d80070fc192e Mon Sep 17 00:00:00 2001
From: Saebekassebil <saebekassebil@gmail.com>
Date: Sun, 25 Mar 2012 13:00:43 +0200
Subject: [PATCH] Fix issue #1302

---
 src/stream.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/stream.js b/src/stream.js
index f76a07b4c..d31f3d50b 100644
--- a/src/stream.js
+++ b/src/stream.js
@@ -2056,7 +2056,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
     if (this.eoblock) {
       code = this.lookBits(7);
       p = twoDimTable[code];
-      if (p[0] > 0) {
+      if (p && p[0] > 0) {
         this.eatBits(p[0]);
         return p[1];
       }