GESTimeline: remove layers before removing tracks in dispose ()

This commit is contained in:
Brandon Lewis 2010-09-23 14:47:48 +01:00 committed by Edward Hervey
parent d2019f3a3d
commit d2b2ac0d51

View file

@ -104,16 +104,21 @@ ges_timeline_dispose (GObject * object)
timeline->discoverer = NULL; timeline->discoverer = NULL;
} }
while (timeline->tracks) {
TrackPrivate *priv = (TrackPrivate *) timeline->tracks->data;
ges_timeline_remove_track (timeline, priv->track);
}
while (timeline->layers) { while (timeline->layers) {
GESTimelineLayer *layer = (GESTimelineLayer *) timeline->layers->data; GESTimelineLayer *layer = (GESTimelineLayer *) timeline->layers->data;
ges_timeline_remove_layer (timeline, layer); ges_timeline_remove_layer (timeline, layer);
} }
/* FIXME: it should be possible to remove tracks before removing
* layers, but at the moment this creates a problem because the track
* objects aren't notified that their gnlobjects have been destroyed.
*/
while (timeline->tracks) {
TrackPrivate *priv = (TrackPrivate *) timeline->tracks->data;
ges_timeline_remove_track (timeline, priv->track);
}
G_OBJECT_CLASS (ges_timeline_parent_class)->dispose (object); G_OBJECT_CLASS (ges_timeline_parent_class)->dispose (object);
} }