changeset 3955:37963a32f627

Fix misleading assertion triggers (Debian #451214) (although that bug was more of a PEBKAC than a bug in Audacious.)
author William Pitcock <nenolod@atheme.org>
date Fri, 16 Nov 2007 04:56:04 -0600
parents 7afbcd87cd65
children 8be86c0b040e f4d7893a16f9
files src/audacious/dbus.c
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/dbus.c	Fri Nov 16 09:14:40 2007 +0200
+++ b/src/audacious/dbus.c	Fri Nov 16 04:56:04 2007 -0600
@@ -403,14 +403,15 @@
 
     metadata = mpris_metadata_from_tuple(tuple);
 
-    if (metadata != NULL) {
-	// Song URI
-	value = g_new0(GValue, 1);
-	g_value_init(value, G_TYPE_STRING);
-	g_value_set_string(value, playlist_get_filename(active, pos));
+    if (!metadata)
+        metadata = g_hash_table_new(g_str_hash, g_str_equal);
 
-	g_hash_table_insert(metadata, "URI", value);
-    }
+    // Song URI
+    value = g_new0(GValue, 1);
+    g_value_init(value, G_TYPE_STRING);
+    g_value_set_string(value, playlist_get_filename(active, pos));
+
+    g_hash_table_insert(metadata, "URI", value);
 
     g_signal_emit(obj, signals[TRACK_CHANGE_SIG], 0, metadata);
     return TRUE;