diff --git a/lib/mu-container.c b/lib/mu-container.c index f0743ac5..7722b64a 100644 --- a/lib/mu-container.c +++ b/lib/mu-container.c @@ -290,8 +290,6 @@ mu_container_splice_grandchildren (MuContainer *parent, MuContainer *child) newchild = child->child; child->child=NULL; - mu_container_remove_child (parent, child); - return mu_container_append_children (parent, newchild); } diff --git a/lib/mu-container.h b/lib/mu-container.h index 6cd76889..5bc268b9 100644 --- a/lib/mu-container.h +++ b/lib/mu-container.h @@ -140,7 +140,7 @@ MuContainer* mu_container_splice_children (MuContainer *c, MuContainer *sibling); /** - * promote child's children to be parent's children and remove child + * promote child's children to be parent's children * * @param parent a container instance * @param child a child of this container diff --git a/lib/mu-threader.c b/lib/mu-threader.c index 1bb4c0f5..d32bbe7a 100644 --- a/lib/mu-threader.c +++ b/lib/mu-threader.c @@ -385,10 +385,12 @@ prune_maybe (MuContainer *c) MuContainer *cur; for (cur = c->child; cur; cur = cur->next) { - if (cur->flags & MU_CONTAINER_FLAG_DELETE) + if (cur->flags & MU_CONTAINER_FLAG_DELETE) { c = mu_container_remove_child (c, cur); - else if (cur->flags & MU_CONTAINER_FLAG_SPLICE) + } else if (cur->flags & MU_CONTAINER_FLAG_SPLICE) { c = mu_container_splice_grandchildren (c, cur); + c = mu_container_remove_child (c, cur); + } } g_return_val_if_fail (c, FALSE);