aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop
diff options
context:
space:
mode:
authorArmin Preiml <apreiml@strohwolke.at>2018-09-10 11:23:08 +0200
committerArmin Preiml <apreiml@strohwolke.at>2018-09-10 11:23:08 +0200
commit47b6fea3fe3c237fde8cc82842f38e001562b36a (patch)
tree61e1a9d3c8ba26110083d02332479ddeba1cfbdc /sway/desktop
parent1376d3610455960cbeb098159d39963c55461d92 (diff)
downloadsway-47b6fea3fe3c237fde8cc82842f38e001562b36a.tar.xz
handle_layer_shell_surface: Do not crash if seat doesn't have focus
Diffstat (limited to 'sway/desktop')
-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,