commit 024b9d85ea4cd51d803317c64e46dac659c9f7ec
parent f7568e26e96abb55b5aaaad76133057f0d14b478
Author: emersion <contact@emersion.fr>
Date: Mon, 10 Sep 2018 13:56:02 +0200
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:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git 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,