[rygel] server: Fix potential crash when applying didl



commit 0233e41a0ee4b3762fea3b1ba1d28f08baa08fba
Author: Richard Röjfors <richard rojfors gmail com>
Date:   Sat May 21 22:39:27 2016 +0200

    server: Fix potential crash when applying didl
    
    In case the incoming didl does not contain a thumbnail uri do not
    access its length.
    
    Signed-off-by: Richard Röjfors <richard puffinpack se>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=766757

 src/librygel-server/rygel-music-item.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/librygel-server/rygel-music-item.vala b/src/librygel-server/rygel-music-item.vala
index 2d9a45e..7e71b83 100644
--- a/src/librygel-server/rygel-music-item.vala
+++ b/src/librygel-server/rygel-music-item.vala
@@ -88,7 +88,7 @@ public class Rygel.MusicItem : AudioItem {
 
         this.track_number = didl_object.track_number;
 
-        if (didl_object.album_art.length > 0) {
+        if (didl_object.album_art != null && didl_object.album_art.length > 0) {
             if (this.album_art == null)
                 this.album_art = new Thumbnail ();
             this.album_art.uri = didl_object.album_art;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]