diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-12-10 11:55:42 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-12-10 11:56:05 +0100 |
commit | 8914ccad3f2378843cbe4e6325d884ab96eb77de (patch) | |
tree | 0362d382c4a79ad552b349ce200bd79bd2cd3804 | |
parent | be4120db9ee1b5dc0eba830156af8dc69a043804 (diff) | |
download | gstreamer-8914ccad3f2378843cbe4e6325d884ab96eb77de.tar.gz |
plugin: protect against NULL filename in debug
See https://bugzilla.gnome.org/show_bug.cgi?id=689948
-rw-r--r-- | gst/gstplugin.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gst/gstplugin.c b/gst/gstplugin.c index 693bc0f085..b506e87f2b 100644 --- a/gst/gstplugin.c +++ b/gst/gstplugin.c @@ -517,7 +517,7 @@ gst_plugin_register_func (GstPlugin * plugin, const GstPluginDesc * desc, if (!gst_plugin_check_version (desc->major_version, desc->minor_version)) { if (GST_CAT_DEFAULT) GST_WARNING ("plugin \"%s\" has incompatible version, not loading", - plugin->filename); + GST_STR_NULL (plugin->filename)); return NULL; } @@ -525,14 +525,14 @@ gst_plugin_register_func (GstPlugin * plugin, const GstPluginDesc * desc, !desc->package || !desc->origin) { if (GST_CAT_DEFAULT) GST_WARNING ("plugin \"%s\" has incorrect GstPluginDesc, not loading", - plugin->filename); + GST_STR_NULL (plugin->filename)); return NULL; } if (!gst_plugin_check_license (desc->license)) { if (GST_CAT_DEFAULT) GST_WARNING ("plugin \"%s\" has invalid license \"%s\", not loading", - plugin->filename, desc->license); + GST_STR_NULL (plugin->filename), desc->license); return NULL; } @@ -550,13 +550,15 @@ gst_plugin_register_func (GstPlugin * plugin, const GstPluginDesc * desc, if (user_data) { if (!(((GstPluginInitFullFunc) (desc->plugin_init)) (plugin, user_data))) { if (GST_CAT_DEFAULT) - GST_WARNING ("plugin \"%s\" failed to initialise", plugin->filename); + GST_WARNING ("plugin \"%s\" failed to initialise", + GST_STR_NULL (plugin->filename)); return NULL; } } else { if (!((desc->plugin_init) (plugin))) { if (GST_CAT_DEFAULT) - GST_WARNING ("plugin \"%s\" failed to initialise", plugin->filename); + GST_WARNING ("plugin \"%s\" failed to initialise", + GST_STR_NULL (plugin->filename)); return NULL; } } |