diff options
author | Jan Schmidt <thaytan@mad.scientist.com> | 2007-07-27 10:38:34 +0000 |
---|---|---|
committer | Jan Schmidt <thaytan@mad.scientist.com> | 2007-07-27 10:38:34 +0000 |
commit | 1364d7b0b1f036e685fc518307fb4d8edd7d172f (patch) | |
tree | 4d51430f0679c78187ab718c24de691126661e04 /ext/gconf | |
parent | e98177afae404e443ae2c41c79a63caf2d3b89ea (diff) |
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.
Diffstat (limited to 'ext/gconf')
-rw-r--r-- | ext/gconf/gconf.c | 7 |
1 files changed, 4 insertions, 3 deletions
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) |