[gegl] gegl_node_add_child: g_return_if_fail() if the child already has a parent
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl_node_add_child: g_return_if_fail() if the child already has a parent
- Date: Fri, 23 Sep 2011 19:49:15 +0000 (UTC)
commit 1aec759c9622cf4292cf47bca1d162b0c48277e7
Author: Michael Natterer <mitch gimp org>
Date: Fri Sep 23 21:48:11 2011 +0200
gegl_node_add_child: g_return_if_fail() if the child already has a parent
gegl/graph/gegl-node.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gegl/graph/gegl-node.c b/gegl/graph/gegl-node.c
index b4bc98e..01bc2b2 100644
--- a/gegl/graph/gegl-node.c
+++ b/gegl/graph/gegl-node.c
@@ -2058,6 +2058,7 @@ gegl_node_add_child (GeglNode *self,
{
g_return_val_if_fail (GEGL_IS_NODE (self), NULL);
g_return_val_if_fail (GEGL_IS_NODE (child), NULL);
+ g_return_val_if_fail (child->priv->parent == NULL, NULL);
self->priv->children = g_slist_prepend (self->priv->children,
g_object_ref (child));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]