mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 14:36:24 +00:00
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.
This commit is contained in:
parent
134e2ffae1
commit
07ee386d30
1 changed files with 2 additions and 0 deletions
|
@ -776,6 +776,8 @@ ges_container_add (GESContainer * container, GESTimelineElement * child)
|
||||||
|
|
||||||
if (ges_timeline_element_set_parent (child, GES_TIMELINE_ELEMENT (container))
|
if (ges_timeline_element_set_parent (child, GES_TIMELINE_ELEMENT (container))
|
||||||
== FALSE) {
|
== FALSE) {
|
||||||
|
if (class->remove_child)
|
||||||
|
class->remove_child (container, child);
|
||||||
|
|
||||||
g_hash_table_remove (priv->mappings, child);
|
g_hash_table_remove (priv->mappings, child);
|
||||||
container->children = g_list_remove (container->children, child);
|
container->children = g_list_remove (container->children, child);
|
||||||
|
|
Loading…
Reference in a new issue