diff options
author | emersion <contact@emersion.fr> | 2018-10-05 09:40:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-05 09:40:05 +0200 |
commit | c1f09939ae4b5c0554b9f78921e02b2f9550c4e5 (patch) | |
tree | 957b38e10118ca079748b12ab64cd88048242f64 /sway/input/seat.c | |
parent | c8d1f376d35132ba119e1f02b6640484c55a34c7 (diff) | |
parent | 44b550298ed64043d54b40f98d627908d37a37d2 (diff) |
Merge pull request #2768 from RyanDwyer/fix-flatten-crash
Fix crash when flattening container after moving
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 415f85ac..675edb2d 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -157,6 +157,11 @@ static void handle_seat_node_destroy(struct wl_listener *listener, void *data) { seat_node_destroy(seat_node); + if (!parent) { + // Destroying a container that is no longer in the tree + return; + } + // Find new focus_inactive (ie. sibling, or workspace if no siblings left) struct sway_node *next_focus = NULL; while (next_focus == NULL) { |