commit d466f07def637e6f6be8e1fb5ff2120ed5096ff9
Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Date:   Mon Feb 14 17:49:54 2011

    matroskademux: avoid sorting NULL array of cluster positions

diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
index 7643119..52f1467 100644
--- a/gst/matroska/matroska-demux.c
+++ b/gst/matroska/matroska-demux.c
@@ -5482,7 +5482,8 @@ gst_matroska_demux_parse_contents (GstMatroskaDemux * demux, GstEbmlRead * ebml)
   DEBUG_ELEMENT_STOP (demux, ebml, "SeekHead", ret);
 
   /* Sort clusters by position for easier searching */
-  g_array_sort (demux->clusters, (GCompareFunc) gst_matroska_cluster_compare);
+  if (demux->clusters)
+    g_array_sort (demux->clusters, (GCompareFunc) gst_matroska_cluster_compare);
 
   return ret;
 }
