[sushi] sound-player: avoid copying a NULL taglist
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sushi] sound-player: avoid copying a NULL taglist
- Date: Fri, 10 Aug 2012 13:38:53 +0000 (UTC)
commit f502e5da2c523ad61f2d0edb966756565a4b9aa4
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Fri Aug 10 15:33:21 2012 +0200
sound-player: avoid copying a NULL taglist
src/libsushi/sushi-sound-player.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/libsushi/sushi-sound-player.c b/src/libsushi/sushi-sound-player.c
index 9d8c8e1..845bb98 100644
--- a/src/libsushi/sushi-sound-player.c
+++ b/src/libsushi/sushi-sound-player.c
@@ -124,13 +124,20 @@ discoverer_discovered_cb (GstDiscoverer *disco,
{
SushiSoundPlayer *player = user_data;
SushiSoundPlayerPrivate *priv;
+ const GstTagList *taglist;
+
priv = SUSHI_SOUND_PLAYER_GET_PRIVATE (player);
if (error != NULL)
return;
- priv->taglist = gst_tag_list_copy (gst_discoverer_info_get_tags (info));
- g_object_notify (G_OBJECT (player), "taglist");
+ taglist = gst_discoverer_info_get_tags (info);
+
+ if (taglist)
+ {
+ priv->taglist = gst_tag_list_copy (taglist);
+ g_object_notify (G_OBJECT (player), "taglist");
+ }
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]