diff options
author | Ian Fan <ianfan0@gmail.com> | 2018-08-18 18:10:41 +0100 |
---|---|---|
committer | Ian Fan <ianfan0@gmail.com> | 2018-08-18 18:10:41 +0100 |
commit | 1be75fe7403fd64e084008b0ed677fa4df32ed5b (patch) | |
tree | 50564536b73fac3147186ff2c562289df8a4b3f2 /sway/tree | |
parent | 744724b3cb28c2ee9d265dcbf78b1cbf2b2e3fef (diff) |
Fix double iterating in container_for_each_child
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/container.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 1ceae175..9bc4f544 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -737,10 +737,10 @@ void container_for_each_child(struct sway_container *container, container->type == C_VIEW, "Expected a container or view")) { return; } - f(container, data); if (container->children) { for (int i = 0; i < container->children->length; ++i) { struct sway_container *child = container->children->items[i]; + f(child, data); container_for_each_child(child, f, data); } } |