[rygel] external: Prevent critical if DisplayName is empty
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] external: Prevent critical if DisplayName is empty
- Date: Thu, 9 Feb 2012 14:17:02 +0000 (UTC)
commit 3b0c8fbfbd3ea5d8eb7d976872bae9ca389ed519
Author: Jens Georg <mail jensge org>
Date: Thu Feb 9 15:45:55 2012 +0200
external: Prevent critical if DisplayName is empty
src/plugins/external/rygel-external-container.vala | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/external/rygel-external-container.vala b/src/plugins/external/rygel-external-container.vala
index a2326c1..9991520 100644
--- a/src/plugins/external/rygel-external-container.vala
+++ b/src/plugins/external/rygel-external-container.vala
@@ -281,7 +281,10 @@ public class Rygel.External.Container : Rygel.MediaContainer,
DBusProxyFlags.DO_NOT_LOAD_PROPERTIES);
var props = yield props_iface.get_all (MediaContainerProxy.IFACE);
var child_count = (uint) props.lookup ("ChildCount");
- this.title = (string) props.lookup ("DisplayName");
+ var title = props.lookup ("DisplayName");
+ if (title != null) {
+ this.title = (string) title;
+ }
this.child_count = (int) child_count;
} catch (GLib.Error property_error) {
warning ("Failed to update information about container '%s': %s",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]