fix for a critical when a module returns NULL on opening

Original commit message from CVS:
fix for a critical when a module returns NULL on opening
This commit is contained in:
Thomas Vander Stichele 2005-09-03 17:36:20 +00:00
parent 25169fe885
commit 0fcba6ca57

View file

@ -375,9 +375,14 @@ gst_plugin_check_file (const gchar * filename, GError ** error)
}
module = g_module_open (filename, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
if (!module) {
check = FALSE;
goto beach;
}
check = gst_plugin_check_module (module, filename, error, NULL);
g_module_close (module);
beach:
GST_INFO ("file \"%s\" %s look like a gst plugin", filename,
check ? "does" : "doesn't");
return check;