From b603027de797e7e2b5afaf01afd369db2178ce7f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 11 Feb 2008 13:48:03 +0000 Subject: [PATCH] ext/gconf/gconf.c: Use and unset the GError when pipeline creation fails instead of simply leaking it. Fixes bug #515... Original commit message from CVS: * ext/gconf/gconf.c: (gst_gconf_render_bin_with_default): Use and unset the GError when pipeline creation fails instead of simply leaking it. Fixes bug #515704. --- ChangeLog | 6 ++++++ ext/gconf/gconf.c | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4d8f4ea..e6ca23a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-02-11 Sebastian Dröge + + * ext/gconf/gconf.c: (gst_gconf_render_bin_with_default): + Use and unset the GError when pipeline creation fails instead of + simply leaking it. Fixes bug #515704. + 2008-02-10 Sebastian Dröge * gst/audiofx/audioamplify.c: diff --git a/ext/gconf/gconf.c b/ext/gconf/gconf.c index 2bda066..e7214e2 100644 --- a/ext/gconf/gconf.c +++ b/ext/gconf/gconf.c @@ -180,6 +180,14 @@ gst_gconf_render_bin_with_default (const gchar * bin, ret = gst_parse_bin_from_description (bin, TRUE, &err); if (ret == NULL || err != NULL) { + if (err) { + GST_DEBUG ("Could not create audio sink from GConf settings: %s", + err->message); + g_error_free (err); + } else { + GST_DEBUG ("Could not create audio sink from GConf settings"); + } + ret = gst_element_factory_make (default_sink, NULL); if (!ret) -- 2.7.4