]> git.parisson.com Git - pdf.js.git/commitdiff
fix for colorspaces
authorsbarman <sbarman@L3CWZ5T.(none)>
Sun, 3 Jul 2011 06:20:30 +0000 (01:20 -0500)
committersbarman <sbarman@L3CWZ5T.(none)>
Sun, 3 Jul 2011 06:20:30 +0000 (01:20 -0500)
pdf.js

diff --git a/pdf.js b/pdf.js
index 8f869a48a1fb95475f4f34008bd545adc388db69..7e47a3c573a2a050946d869d83f85ce6822d4053 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -4380,9 +4380,11 @@ var ColorSpace = (function() {
     constructor.parse = function colorspace_parse(cs, xref, res) {
         if (IsName(cs)) {
             var colorSpaces = res.get("ColorSpace");
-            var refcs = colorSpaces.get(cs.name);
-            if (refcs)
-                cs = refcs;
+            if (colorSpaces) {
+                var refcs = colorSpaces.get(cs.name);
+                if (refcs)
+                    cs = refcs;
+            }
         }
             
         cs = xref.fetchIfRef(cs);