diff options
author | Alexandru Băluț <alexandru.balut@gmail.com> | 2019-04-11 23:58:48 +0200 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2019-04-17 21:56:21 +0000 |
commit | 07ee386d30b72c3d3eb6b5d517dff9b6c3fb6cee (patch) | |
tree | 9f9853be59e7001278eff8dcb2bb217ae0b10d4d | |
parent | 134e2ffae1aae0a067cb52ca5fd09b017d9cf7d4 (diff) |
container: Call _remove_child when cannot set parent
ges_container_add removes the child being added if the call to
ges_timeline_element_set_parent fails. In this case, subclasses should
be given the chance to revert the effects of the add_child vmethod which
has just been called.
-rw-r--r-- | ges/ges-container.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ges/ges-container.c b/ges/ges-container.c index 87a3abbe..07a5afa7 100644 --- a/ges/ges-container.c +++ b/ges/ges-container.c @@ -776,6 +776,8 @@ ges_container_add (GESContainer * container, GESTimelineElement * child) if (ges_timeline_element_set_parent (child, GES_TIMELINE_ELEMENT (container)) == FALSE) { + if (class->remove_child) + class->remove_child (container, child); g_hash_table_remove (priv->mappings, child); container->children = g_list_remove (container->children, child); |