summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-09-26 07:39:13 -0500
committerLibravatar GitHub <noreply@github.com>2018-09-26 07:39:13 -0500
commit1ef96f7fb770bc6d649e71e94abd1fad798a427f (patch)
tree26baa780b691786d3f2eaf522a9cdc820caaa549
parentMerge pull request #2712 from alexbakker/fix-crash (diff)
parentFix race condition crash when view unmaps + maps quickly (diff)
downloadsway-1ef96f7fb770bc6d649e71e94abd1fad798a427f.tar.gz
sway-1ef96f7fb770bc6d649e71e94abd1fad798a427f.tar.zst
sway-1ef96f7fb770bc6d649e71e94abd1fad798a427f.zip
Merge pull request #2713 from RyanDwyer/fix-remap-race
Fix race condition crash when view unmaps + maps quickly
-rw-r--r--sway/tree/container.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 329145cf..baaa82fd 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -67,12 +67,10 @@ void container_destroy(struct sway_container *con) {
67 list_free(con->outputs); 67 list_free(con->outputs);
68 68
69 if (con->view) { 69 if (con->view) {
70 struct sway_view *view = con->view; 70 if (con->view->container == con) {
71 view->container = NULL; 71 con->view->container = NULL;
72 free(view->title_format); 72 }
73 view->title_format = NULL; 73 if (con->view->destroying) {
74
75 if (view->destroying) {
76 view_destroy(con->view); 74 view_destroy(con->view);
77 } 75 }
78 } 76 }