[gst-cvs] gstreamer: pluginfeature: add guard to gst_plugin_feature_type_name_filter
Tim Mueller
tpm at kemper.freedesktop.org
Thu Aug 20 03:59:33 PDT 2009
Module: gstreamer
Branch: master
Commit: a01e5b8dca00c701965f871c29486d339f03b017
URL: http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=a01e5b8dca00c701965f871c29486d339f03b017
Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date: Thu Aug 20 11:54:40 2009 +0100
pluginfeature: add guard to gst_plugin_feature_type_name_filter
So we don't just crash if there's a refcounting bug somewhere else.
---
gst/gstpluginfeature.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/gst/gstpluginfeature.c b/gst/gstpluginfeature.c
index e7e5038..a38122a 100644
--- a/gst/gstpluginfeature.c
+++ b/gst/gstpluginfeature.c
@@ -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))));
More information about the Gstreamer-commits
mailing list