From 0f0f00e2e887acb61fa6e501dc13c30fb6008a00 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Sun, 18 Sep 2005 09:15:10 +0000 Subject: [PATCH] loading a plugin can return NULL Original commit message from CVS: loading a plugin can return NULL --- gst/gstregistry.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/gstregistry.c b/gst/gstregistry.c index 035e02be4a..531a7fc196 100644 --- a/gst/gstregistry.c +++ b/gst/gstregistry.c @@ -634,13 +634,15 @@ gst_registry_scan_path_level (GstRegistry * registry, const gchar * path, plugin->file_size, file_status.st_size); gst_registry_remove_plugin (gst_registry_get_default (), plugin); newplugin = gst_plugin_load_file (filename, NULL); - gst_object_unref (newplugin); + if (newplugin) + gst_object_unref (newplugin); } gst_object_unref (plugin); } else { newplugin = gst_plugin_load_file (filename, NULL); - gst_object_unref (newplugin); + if (newplugin) + gst_object_unref (newplugin); } g_free (filename);