fix #1227 pixbuf could be None in some cases

I couldn't reproduce it but I guess it's possible
This commit is contained in:
Eric Le Lay 2022-03-16 22:29:08 +01:00
parent 5043b0b192
commit 2ee8c23b31
1 changed files with 2 additions and 0 deletions

View File

@ -767,6 +767,8 @@ class PodcastListModel(Gtk.ListStore):
if pixbuf_overlay is None:
# load cover if it's not in cache
pixbuf = self._cover_downloader.get_cover(channel, avoid_downloading=True)
if pixbuf is None:
return None
pixbuf_overlay = self._resize_pixbuf(channel.url, pixbuf)
self._save_cached_thumb(channel, pixbuf_overlay)