From b35b752c41c6b207db862309d6fae4e0977635f2 Mon Sep 17 00:00:00 2001 From: Sebastian Dröge Date: Fri, 4 Sep 2009 07:10:03 +0200 Subject: matroskademux: Correctly handle NULL GstIndex --- gst/matroska/matroska-demux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gst/matroska') diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index b3669197..9cab4194 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -5803,7 +5803,7 @@ gst_matroska_demux_set_index (GstElement * element, GstIndex * index) GST_OBJECT_LOCK (demux); if (demux->element_index) gst_object_unref (demux->element_index); - demux->element_index = gst_object_ref (index); + demux->element_index = index ? gst_object_ref (index) : NULL; GST_OBJECT_UNLOCK (demux); GST_DEBUG_OBJECT (demux, "Set index %" GST_PTR_FORMAT, demux->element_index); } -- cgit