Merge pull request #2713 from RyanDwyer/fix-remap-race

Fix race condition crash when view unmaps + maps quickly
This commit is contained in:
Drew DeVault 2018-09-26 07:39:13 -05:00 committed by GitHub
commit 1ef96f7fb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 6 deletions

View File

@ -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);
}
}