pluginfeature: add guard to gst_plugin_feature_type_name_filter
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 20 Aug 2009 10:54:40 +0000 (11:54 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 20 Aug 2009 10:55:44 +0000 (11:55 +0100)
So we don't just crash if there's a refcounting bug somewhere else.

gst/gstpluginfeature.c

index e7e5038..a38122a 100644 (file)
@@ -159,6 +159,8 @@ gboolean
 gst_plugin_feature_type_name_filter (GstPluginFeature * feature,
     GstTypeNameData * data)
 {
+  g_return_val_if_fail (GST_IS_PLUGIN_FEATURE (feature), FALSE);
+
   return ((data->type == 0 || data->type == G_OBJECT_TYPE (feature)) &&
       (data->name == NULL
           || !strcmp (data->name, GST_PLUGIN_FEATURE_NAME (feature))));