mirror of
https://github.com/swaywm/sway.git
synced 2024-11-23 00:11:28 +00:00
Merge pull request #2713 from RyanDwyer/fix-remap-race
Fix race condition crash when view unmaps + maps quickly
This commit is contained in:
commit
1ef96f7fb7
|
@ -67,12 +67,10 @@ void container_destroy(struct sway_container *con) {
|
||||||
list_free(con->outputs);
|
list_free(con->outputs);
|
||||||
|
|
||||||
if (con->view) {
|
if (con->view) {
|
||||||
struct sway_view *view = con->view;
|
if (con->view->container == con) {
|
||||||
view->container = NULL;
|
con->view->container = NULL;
|
||||||
free(view->title_format);
|
}
|
||||||
view->title_format = NULL;
|
if (con->view->destroying) {
|
||||||
|
|
||||||
if (view->destroying) {
|
|
||||||
view_destroy(con->view);
|
view_destroy(con->view);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue