[gnome-music/wip/mschraal/albumartcache-check-gst-struct-3.36] albumartcache: Check if embedded info exists
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/albumartcache-check-gst-struct-3.36] albumartcache: Check if embedded info exists
- Date: Sat, 25 Apr 2020 17:56:42 +0000 (UTC)
commit f79c8695f81e04220eb99d02100063182cba5e17
Author: Marinus Schraal <mschraal gnome org>
Date: Tue Apr 21 23:06:52 2020 +0200
albumartcache: Check if embedded info exists
The embedded art extra info can in rare cases be None, this will result
in a crash.
Add a None check to fix this.
gnomemusic/albumartcache.py | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/gnomemusic/albumartcache.py b/gnomemusic/albumartcache.py
index fbfd1f0f..e737d038 100644
--- a/gnomemusic/albumartcache.py
+++ b/gnomemusic/albumartcache.py
@@ -472,6 +472,8 @@ class EmbeddedArt(GObject.GObject):
break
index += 1
struct = sample.get_info()
+ if struct is None:
+ break
success, image_type = struct.get_enum(
'image-type', GstTag.TagImageType)
if not success:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]