mirror of
https://github.com/swaywm/sway.git
synced 2025-11-24 06:59:51 -05:00
Fix potential null accesses
This commit is contained in:
parent
e7d6b8ec3e
commit
913445e112
2 changed files with 54 additions and 48 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue