Mercurial > audlegacy
diff src/audacious/dbus.c @ 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 | fd6b3f983ff6 |
children | f1ed63913f1c |
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;