diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-09-02 15:37:56 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-09-05 18:01:43 +1000 |
commit | 4e0452fce3bfc96db6f6f2951794cbb26e75ccd7 (patch) | |
tree | dfc9d82c97b051ec1829f918829a1f3c852c5131 /sway/tree/view.c | |
parent | 93ff7879f16c5e31c18a37e87b23ee5dcb5a584b (diff) |
Fix scratchpad related crashes
* Was crashing when a view was moved to the scratchpad (prev focus had
no parent).
* Was crashing when a hidden scratchpad view unmaps because it has no
workspace.
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r-- | sway/tree/view.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index 1b8d5738..57851b16 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -560,11 +560,11 @@ void view_unmap(struct sway_view *view) { container_begin_destroy(view->container); if (parent) { container_reap_empty(parent); - } else { + } else if (ws) { workspace_consider_destroy(ws); } - if (!ws->node.destroying) { + if (ws && !ws->node.destroying) { arrange_workspace(ws); workspace_detect_urgent(ws); } |