mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-17 18:54:46 +03:00
Do not close fp in libtiff case prematurely.
This commit is contained in:
parent
19d30c170e
commit
4e8778a0a0
|
@ -1096,10 +1096,6 @@ class TiffImageFile(ImageFile.ImageFile):
|
||||||
|
|
||||||
self.tile = []
|
self.tile = []
|
||||||
self.readonly = 0
|
self.readonly = 0
|
||||||
# libtiff closed the fp in a, we need to close self.fp, if possible
|
|
||||||
if hasattr(self.fp, 'close'):
|
|
||||||
if not self.__next:
|
|
||||||
self.fp.close()
|
|
||||||
self.fp = None # might be shared
|
self.fp = None # might be shared
|
||||||
|
|
||||||
if err < 0:
|
if err < 0:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user