]> git.parisson.com Git - pdf.js.git/commitdiff
fix issue #78, don't try to use 'in' operator on null
authorAndreas Gal <andreas.gal@gmail.com>
Sat, 25 Jun 2011 03:27:22 +0000 (23:27 -0400)
committerAndreas Gal <andreas.gal@gmail.com>
Sat, 25 Jun 2011 03:27:22 +0000 (23:27 -0400)
pdf.js

diff --git a/pdf.js b/pdf.js
index a34cd7c42cba8357ce2ab876fe69f8dc9102f027..48fd742b21e3b42b9cc9f208d5188431a59bbc79 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -979,7 +979,7 @@ function IsArray(v) {
 }
 
 function IsStream(v) {
-    return typeof v == "object" && "getChar" in v;
+    return typeof v == "object" && v != null && ("getChar" in v);
 }
 
 function IsRef(v) {