diff options
author | emersion <contact@emersion.fr> | 2018-09-10 13:56:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-10 13:56:02 +0200 |
commit | 024b9d85ea4cd51d803317c64e46dac659c9f7ec (patch) | |
tree | b22ac5f47e6779bca07e3626780dee9e9e08943d /sway/desktop/layer_shell.c | |
parent | f7568e26e96abb55b5aaaad76133057f0d14b478 (diff) | |
parent | 47b6fea3fe3c237fde8cc82842f38e001562b36a (diff) |
Merge pull request #2613 from apreiml/fix_no_last_focus_fail
handle_layer_shell_surface: Do not crash if seat doesn't have focus
Diffstat (limited to 'sway/desktop/layer_shell.c')
-rw-r--r-- | sway/desktop/layer_shell.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c index 7d254173..076bacc4 100644 --- a/sway/desktop/layer_shell.c +++ b/sway/desktop/layer_shell.c @@ -337,7 +337,10 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) { struct sway_seat *seat = input_manager_get_default_seat(input_manager); if (seat) { struct sway_workspace *ws = seat_get_focused_workspace(seat); - output = ws->output; + + if (ws != NULL) { + output = ws->output; + } } if (!output) { if (!sway_assert(root->outputs->length, |