Close the pixbufloader in all cases. Fixes gtk warnings in console.
This commit is contained in:
parent
5f797834ae
commit
bcbcc98b06
|
@ -396,6 +396,7 @@ def get_pixbuf_from_data(file_data, want_type = False):
|
||||||
pixbufloader.close()
|
pixbufloader.close()
|
||||||
pixbuf = pixbufloader.get_pixbuf()
|
pixbuf = pixbufloader.get_pixbuf()
|
||||||
except gobject.GError: # 'unknown image format'
|
except gobject.GError: # 'unknown image format'
|
||||||
|
pixbufloader.close()
|
||||||
pixbuf = None
|
pixbuf = None
|
||||||
if want_type:
|
if want_type:
|
||||||
return None, None
|
return None, None
|
||||||
|
|
Loading…
Reference in New Issue