From 1364d7b0b1f036e685fc518307fb4d8edd7d172f Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 27 Jul 2007 10:38:34 +0000 Subject: ext/gconf/gconf.c: Handle a NULL gconf key gracefully by rendering the default element. Original commit message from CVS: * ext/gconf/gconf.c: (gst_gconf_render_bin_with_default): Handle a NULL gconf key gracefully by rendering the default element. --- ext/gconf/gconf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ext') diff --git a/ext/gconf/gconf.c b/ext/gconf/gconf.c index 81c1f550..2bda0669 100644 --- a/ext/gconf/gconf.c +++ b/ext/gconf/gconf.c @@ -173,12 +173,13 @@ GstElement * gst_gconf_render_bin_with_default (const gchar * bin, const gchar * default_sink) { - GstElement *ret; + GstElement *ret = NULL; GError *err = NULL; - ret = gst_parse_bin_from_description (bin, TRUE, &err); + if (bin != NULL) + ret = gst_parse_bin_from_description (bin, TRUE, &err); - if (err) { + if (ret == NULL || err != NULL) { ret = gst_element_factory_make (default_sink, NULL); if (!ret) -- cgit