diff options
author | Thibault Saunier <tsaunier@gnome.org> | 2016-01-06 18:14:07 +0100 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2016-01-18 15:01:06 +0100 |
commit | 094c2487ee26b44700b89f8327443e98b077ca8f (patch) | |
tree | 9385b222569bf11e58a03b96a8a64a502a720033 | |
parent | 4cea3d11a624738f41a77040c2743638b2c6e5ac (diff) |
timeline: Fix infinite loop on dispose
Reviewed-by: Thibault Saunier <thibault.saunier@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D628
-rw-r--r-- | ges/ges-timeline.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ges/ges-timeline.c b/ges/ges-timeline.c index 8eabdbd3..ff52e76f 100644 --- a/ges/ges-timeline.c +++ b/ges/ges-timeline.c @@ -338,6 +338,7 @@ ges_timeline_dispose (GObject * object) { GESTimeline *tl = GES_TIMELINE (object); GESTimelinePrivate *priv = tl->priv; + GList *tmp; while (tl->layers) { GESLayer *layer = (GESLayer *) tl->layers->data; @@ -352,10 +353,12 @@ ges_timeline_dispose (GObject * object) 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); |