get the type number before showing it
authorThomas Vander Stichele <thomas@apestaart.org>
Wed, 28 Aug 2002 16:07:34 +0000 (16:07 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Wed, 28 Aug 2002 16:07:34 +0000 (16:07 +0000)
Original commit message from CVS:
get the type number before showing it

gst/gstelementfactory.c

index 89e09c9..702ed8e 100644 (file)
@@ -190,13 +190,13 @@ gst_element_factory_create (GstElementFactory *factory,
 
   g_return_val_if_fail (factory != NULL, NULL);
 
+  if (!gst_plugin_feature_ensure_loaded (GST_PLUGIN_FEATURE (factory)))
+    return NULL;
+
   GST_DEBUG (GST_CAT_ELEMENT_FACTORY,
              "creating element from factory \"%s\" (name \"%s\", type %d)", 
              GST_OBJECT_NAME (factory), name, (gint) factory->type);
 
-  if (!gst_plugin_feature_ensure_loaded (GST_PLUGIN_FEATURE (factory)))
-    return NULL;
-
   if (factory->type == 0) {
       g_critical ("Factory for `%s' has no type",
                  GST_PLUGIN_FEATURE_NAME (factory));