cursor: guard against NULL dereference

...in apply_constraint()

Reported-by: Blackb|rd
This commit is contained in:
Johan Malm 2024-10-19 19:37:56 +01:00
parent a567b4dc3b
commit d2837aace0

View file

@ -749,6 +749,9 @@ constrain_cursor(struct server *server, struct wlr_pointer_constraint_v1
static void
apply_constraint(struct seat *seat, struct wlr_pointer *pointer, double *x, double *y)
{
if (!seat->server->active_view) {
return;
}
if (!seat->current_constraint || pointer->base.type != WLR_INPUT_DEVICE_POINTER) {
return;
}