diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-09-26 07:39:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-26 07:39:13 -0500 |
commit | 1ef96f7fb770bc6d649e71e94abd1fad798a427f (patch) | |
tree | 26baa780b691786d3f2eaf522a9cdc820caaa549 | |
parent | c43374cdf043e913b48d3cdb31d0f716a2cf58bd (diff) | |
parent | 4e4898e90f4d9b721091137a744deac335e73f12 (diff) | |
download | sway-1ef96f7fb770bc6d649e71e94abd1fad798a427f.tar.xz |
Merge pull request #2713 from RyanDwyer/fix-remap-race
Fix race condition crash when view unmaps + maps quickly
-rw-r--r-- | sway/tree/container.c | 10 |
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) { list_free(con->outputs); if (con->view) { - struct sway_view *view = con->view; - view->container = NULL; - free(view->title_format); - view->title_format = NULL; - - if (view->destroying) { + if (con->view->container == con) { + con->view->container = NULL; + } + if (con->view->destroying) { view_destroy(con->view); } } |