asfdemux: don't try to free a NULL taglist
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 23 Jun 2009 15:45:00 +0000 (16:45 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 23 Jun 2009 15:45:00 +0000 (16:45 +0100)
gst/asfdemux/gstasfdemux.c

index 6ff63198005afd8f716751218534e1cdbae8425a..9490572c2e1e8ae9797724d5b05e2642b383c5ea 100644 (file)
@@ -2141,7 +2141,8 @@ gst_asf_demux_add_global_tags (GstASFDemux * demux, GstTagList * taglist)
   }
 
   t = gst_tag_list_merge (demux->taglist, taglist, GST_TAG_MERGE_APPEND);
-  gst_tag_list_free (demux->taglist);
+  if (demux->taglist)
+    gst_tag_list_free (demux->taglist);
   gst_tag_list_free (taglist);
   demux->taglist = t;
   GST_LOG_OBJECT (demux, "global tags now: %" GST_PTR_FORMAT, demux->taglist);