mirror of https://github.com/kivy/kivy.git
Core:Loader fix crash on invalid filehandle and img_pygame: fix
indentation closes #265
This commit is contained in:
parent
9d734e9b10
commit
75d1ca2624
|
@ -59,7 +59,7 @@ class ImageLoaderPygame(ImageLoaderBase):
|
|||
Logger.warning(
|
||||
'Image: Unable to convert image %r to rgba (was %r)' %
|
||||
(filename, im.fmt))
|
||||
raise
|
||||
raise
|
||||
im = imc
|
||||
|
||||
# update internals
|
||||
|
|
|
@ -183,7 +183,10 @@ class LoaderBase(object):
|
|||
except Exception:
|
||||
Logger.exception('Failed to load image <%s>' % filename)
|
||||
# close file when remote file not found or download error
|
||||
close(_out_osfd)
|
||||
try:
|
||||
close(_out_osfd)
|
||||
except OSError:
|
||||
pass
|
||||
return self.error_image
|
||||
finally:
|
||||
if _out_filename != '':
|
||||
|
|
Loading…
Reference in New Issue