controller: fix assertion when freeing the control source
authorStefan Kost <ensonic@users.sf.net>
Wed, 20 May 2009 14:24:19 +0000 (17:24 +0300)
committerStefan Kost <ensonic@users.sf.net>
Wed, 20 May 2009 14:33:18 +0000 (17:33 +0300)
libs/gst/controller/gstinterpolationcontrolsource.c

index 85ab095..e3983b0 100644 (file)
@@ -594,8 +594,10 @@ gst_interpolation_control_source_unset_all (GstInterpolationControlSource *
 
   g_mutex_lock (self->lock);
   /* free GstControlPoint structures */
-  g_sequence_free (self->priv->values);
-  self->priv->values = NULL;
+  if (self->priv->values) {
+    g_sequence_free (self->priv->values);
+    self->priv->values = NULL;
+  }
   self->priv->nvalues = 0;
   self->priv->valid_cache = FALSE;