gstindex: Make sure writer is non-NULL.

Fixes the NULL dereference a few lines lower (where it gets the object type).
This commit is contained in:
Edward Hervey 2009-10-08 08:52:18 +02:00
parent fff8656af3
commit 219c3c5236

View file

@ -616,6 +616,8 @@ static gboolean
gst_index_gtype_resolver (GstIndex * index, GstObject * writer,
gchar ** writer_string, gpointer data)
{
g_return_val_if_fail (writer != NULL, FALSE);
if (GST_IS_PAD (writer)) {
GstElement *element =
(GstElement *) gst_object_get_parent (GST_OBJECT (writer));