From 5aa254a68fb0e6fff423dc4236cbcc407bb95c38 Mon Sep 17 00:00:00 2001 From: Murray Cumming Date: Tue, 29 Jan 2013 12:16:10 +0100 Subject: [PATCH] RygelThumbnail: Avoid a critical warning in tests. --- src/librygel-server/rygel-thumbnail.vala | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/librygel-server/rygel-thumbnail.vala b/src/librygel-server/rygel-thumbnail.vala index e4f3a9c..42ed920 100644 --- a/src/librygel-server/rygel-thumbnail.vala +++ b/src/librygel-server/rygel-thumbnail.vala @@ -40,7 +40,16 @@ public class Rygel.Thumbnail : Rygel.IconInfo { string protocol) { var res = didl_item.add_resource (); - res.uri = this.uri; + /* We check for NULL because + * gupnp_didl_lite_resource_set_uri(), + * used by the generated code, + * complains, with a critical warning, if the URI is NULL. + * It's already the default. + */ + if (this.uri != null) { + res.uri = this.uri; + } + res.size64 = this.size; res.width = this.width; -- 2.7.4