avoid crash when colorspace is null.

pull/1/head
Yusuke Shinyama 2011-11-06 20:10:48 +10:00
parent 3d1652963a
commit 91174b5665
1 changed files with 1 additions and 1 deletions

View File

@ -326,7 +326,7 @@ class PDFPageInterpreter(object):
elif name == 'DeviceN' and isinstance(spec, list) and 2 <= len(spec):
return PDFColorSpace(name, len(list_value(spec[1])))
else:
return PREDEFINED_COLORSPACE[name]
return PREDEFINED_COLORSPACE.get(name)
for (k,v) in dict_value(resources).iteritems():
if 2 <= self.debug:
print >>sys.stderr, 'Resource: %r: %r' % (k,v)