loading a plugin can return NULL
authorThomas Vander Stichele <thomas@apestaart.org>
Sun, 18 Sep 2005 09:15:10 +0000 (09:15 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Sun, 18 Sep 2005 09:15:10 +0000 (09:15 +0000)
Original commit message from CVS:
loading a plugin can return NULL

gst/gstregistry.c

index 035e02b..531a7fc 100644 (file)
@@ -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);