mirror of
https://github.com/swaywm/sway.git
synced 2024-12-29 00:16:22 +01:00
Merge pull request #2365 from RyanDwyer/fix-cmd-defer-crash
Fix crash when a deferred command destroys a workspace
This commit is contained in:
commit
68d6307aa6
1 changed files with 5 additions and 2 deletions
|
@ -142,8 +142,6 @@ struct sway_container *container_create(enum sway_container_type type) {
|
||||||
static void container_workspace_free(struct sway_workspace *ws) {
|
static void container_workspace_free(struct sway_workspace *ws) {
|
||||||
list_foreach(ws->output_priority, free);
|
list_foreach(ws->output_priority, free);
|
||||||
list_free(ws->output_priority);
|
list_free(ws->output_priority);
|
||||||
ws->floating->destroying = true;
|
|
||||||
container_free(ws->floating);
|
|
||||||
free(ws);
|
free(ws);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,6 +194,9 @@ void container_free(struct sway_container *cont) {
|
||||||
free(cont);
|
free(cont);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct sway_container *container_destroy_noreaping(
|
||||||
|
struct sway_container *con);
|
||||||
|
|
||||||
static struct sway_container *container_workspace_destroy(
|
static struct sway_container *container_workspace_destroy(
|
||||||
struct sway_container *workspace) {
|
struct sway_container *workspace) {
|
||||||
if (!sway_assert(workspace, "cannot destroy null workspace")) {
|
if (!sway_assert(workspace, "cannot destroy null workspace")) {
|
||||||
|
@ -240,6 +241,8 @@ static struct sway_container *container_workspace_destroy(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
container_destroy_noreaping(workspace->sway_workspace->floating);
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue