From dce85c8727cef5bbec3526ebfb56748ed6f84541 Mon Sep 17 00:00:00 2001 From: Cyril Danilevski Date: Sat, 26 Jun 2021 23:56:28 +0200 Subject: [PATCH] Handle invalid image uri in web imports --- src/gourmet/image_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gourmet/image_utils.py b/src/gourmet/image_utils.py index 3ae0ee463..50e07e183 100644 --- a/src/gourmet/image_utils.py +++ b/src/gourmet/image_utils.py @@ -134,6 +134,8 @@ def __init__(self, parent: Gtk.Window, uris: List[str]): for uri in uris: image = make_thumbnail(uri, ThumbnailSize.SMALL) + if image is None: + continue pixbuf = bytes_to_pixbuf(image_to_bytes(image)) self.liststore.append([pixbuf])