Merge pull request #1131 from mixcloud/gd-unbound-local-variable

Fix UnboundLocalError in ImageFile
This commit is contained in:
Hugo 2015-04-01 14:16:36 +03:00
commit 4308872809

View File

@ -196,6 +196,9 @@ class ImageFile(Image.Image):
except AttributeError: except AttributeError:
prefix = b"" prefix = b""
# Buffer length read; assign a default value
t = 0
for d, e, o, a in self.tile: for d, e, o, a in self.tile:
d = Image._getdecoder(self.mode, d, a, self.decoderconfig) d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
seek(o) seek(o)