{
GESTimeline *tl = GES_TIMELINE (object);
GESTimelinePrivate *priv = tl->priv;
+ GList *tmp;
while (tl->layers) {
GESLayer *layer = (GESLayer *) tl->layers->data;
while (tl->tracks)
ges_timeline_remove_track (GES_TIMELINE (object), tl->tracks->data);
- while (priv->groups)
- g_list_free_full (ges_container_ungroup (priv->groups->data, FALSE),
+ for (tmp = priv->groups; tmp; tmp = tmp->next)
+ g_list_free_full (ges_container_ungroup (tmp->data, FALSE),
gst_object_unref);
+ g_list_free (priv->groups);
+
g_hash_table_unref (priv->by_start);
g_hash_table_unref (priv->by_end);
g_hash_table_unref (priv->by_object);