summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2017-08-06 11:27:53 -0400
committerLibravatar GitHub <noreply@github.com>2017-08-06 11:27:53 -0400
commite12d1cf00382fcfdab17013921161cc661ef556d (patch)
treebfae22df29dd5cf78c60e35626056fa740f47ae0
parentMerge pull request #1300 from emersion/patch-1 (diff)
parentPrevent race condition in the kill command (diff)
downloadsway-e12d1cf00382fcfdab17013921161cc661ef556d.tar.gz
sway-e12d1cf00382fcfdab17013921161cc661ef556d.tar.zst
sway-e12d1cf00382fcfdab17013921161cc661ef556d.zip
Merge pull request #1309 from 4e554c4c/racey_kills
Prevent race condition in the kill command
-rw-r--r--sway/container.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/container.c b/sway/container.c
index 125e1e3d..14647b3a 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -849,7 +849,6 @@ int swayc_gap(swayc_t *container) {
849 849
850void container_map(swayc_t *container, void (*f)(swayc_t *view, void *data), void *data) { 850void container_map(swayc_t *container, void (*f)(swayc_t *view, void *data), void *data) {
851 if (container) { 851 if (container) {
852 f(container, data);
853 int i; 852 int i;
854 if (container->children) { 853 if (container->children) {
855 for (i = 0; i < container->children->length; ++i) { 854 for (i = 0; i < container->children->length; ++i) {
@@ -863,6 +862,7 @@ void container_map(swayc_t *container, void (*f)(swayc_t *view, void *data), voi
863 container_map(child, f, data); 862 container_map(child, f, data);
864 } 863 }
865 } 864 }
865 f(container, data);
866 } 866 }
867} 867}
868 868