aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/layer_shell.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-09-10 13:56:02 +0200
committerGitHub <noreply@github.com>2018-09-10 13:56:02 +0200
commit024b9d85ea4cd51d803317c64e46dac659c9f7ec (patch)
treeb22ac5f47e6779bca07e3626780dee9e9e08943d /sway/desktop/layer_shell.c
parentf7568e26e96abb55b5aaaad76133057f0d14b478 (diff)
parent47b6fea3fe3c237fde8cc82842f38e001562b36a (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.c5
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,