fix for a critical when a module returns NULL on opening
authorThomas Vander Stichele <thomas@apestaart.org>
Sat, 3 Sep 2005 17:36:20 +0000 (17:36 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Sat, 3 Sep 2005 17:36:20 +0000 (17:36 +0000)
Original commit message from CVS:
fix for a critical when a module returns NULL on opening

gst/gstplugin.c

index 2390e5c..7e4958f 100644 (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;