diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-07-28 09:05:04 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-28 09:05:04 -0400 |
commit | 68d6307aa67f2aab16bfbbf56427666cde964a6c (patch) | |
tree | 598a024d300d4bdb700dff328a919b94b06a1e29 /sway | |
parent | a2164c666197e983b2059647e31fd93491893c43 (diff) | |
parent | 84cd22c8cb722daaa9250a792da0f44930accfae (diff) |
Merge pull request #2365 from RyanDwyer/fix-cmd-defer-crash
Fix crash when a deferred command destroys a workspace
Diffstat (limited to 'sway')
-rw-r--r-- | sway/tree/container.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 6ebf2653..01387636 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -142,8 +142,6 @@ struct sway_container *container_create(enum sway_container_type type) { static void container_workspace_free(struct sway_workspace *ws) { list_foreach(ws->output_priority, free); list_free(ws->output_priority); - ws->floating->destroying = true; - container_free(ws->floating); free(ws); } @@ -196,6 +194,9 @@ void container_free(struct sway_container *cont) { free(cont); } +static struct sway_container *container_destroy_noreaping( + struct sway_container *con); + static struct sway_container *container_workspace_destroy( struct sway_container *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; } |