container: Do not allow adding an element to a container if it already has a parent

This should never happen, an element can have 1 and only 1 parent.
This commit is contained in:
Thibault Saunier 2013-06-28 19:17:54 -04:00 committed by Mathieu Duponchelle
parent bcfeada696
commit 9d13c5cbd3

View file

@ -472,6 +472,7 @@ ges_container_add (GESContainer * container, GESTimelineElement * child)
g_return_val_if_fail (GES_IS_CONTAINER (container), FALSE);
g_return_val_if_fail (GES_IS_TIMELINE_ELEMENT (child), FALSE);
g_return_val_if_fail (GES_TIMELINE_ELEMENT_PARENT (child) == NULL, FALSE);
class = GES_CONTAINER_GET_CLASS (container);
priv = container->priv;