From 9d13c5cbd38a41e217f4f09fa5f79bc296c5ca3c Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Fri, 28 Jun 2013 19:17:54 -0400 Subject: 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. --- ges/ges-container.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ges/ges-container.c') diff --git a/ges/ges-container.c b/ges/ges-container.c index 16a27caa..88fc4f0c 100644 --- a/ges/ges-container.c +++ b/ges/ges-container.c @@ -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; -- cgit v1.2.3