diff options
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index d58ff9e6..bdab8b81 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -1194,11 +1194,13 @@ void seat_consider_warp_to_focus(struct sway_seat *seat) { } if (config->mouse_warping == WARP_OUTPUT) { struct sway_output *output = node_get_output(focus); - struct wlr_box box; - output_get_box(output, &box); - if (wlr_box_contains_point(&box, - seat->cursor->cursor->x, seat->cursor->cursor->y)) { - return; + if (output) { + struct wlr_box box; + output_get_box(output, &box); + if (wlr_box_contains_point(&box, + seat->cursor->cursor->x, seat->cursor->cursor->y)) { + return; + } } } |