Commit 8ce627ee authored by Daniel Brötzmann's avatar Daniel Brötzmann
Browse files

[preview] Catch errors when closing pixbuf loader

parent 002fa81e
......@@ -136,11 +136,11 @@ def create_thumbnail_with_pixbuf(data, size):
loader = GdkPixbuf.PixbufLoader()
try:
loader.write(data)
loader.close()
except GLib.Error as error:
log.warning('making pixbuf failed: %s', error)
return None
loader.close()
pixbuf = loader.get_pixbuf()
if size > pixbuf.get_width() and size > pixbuf.get_height():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment