From: Thibault Saunier Date: Wed, 6 Jan 2016 17:14:07 +0000 (+0100) Subject: timeline: Fix infinite loop on dispose X-Git-Tag: 1.19.3~493^2~1068 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0c46363f741e78e6493f20723790fa7101999ad8;p=platform%2Fupstream%2Fgstreamer.git timeline: Fix infinite loop on dispose Reviewed-by: Thibault Saunier Differential Revision: https://phabricator.freedesktop.org/D628 --- diff --git a/ges/ges-timeline.c b/ges/ges-timeline.c index 1c805b437f..ff7559e887 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);