[gnome-music/wip/mschraal/albumartcache-check-gst-struct] 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] albumartcache: Check if embedded info exists
- Date: Tue, 21 Apr 2020 21:21:20 +0000 (UTC)
commit b6405247c329537da68af2c5e6863cede98dc547
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 28b3526b..8f454275 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]