cursor: guard against NULL dereference (#2250)

...in apply_constraint()

Reported-by: Blackb|rd
This commit is contained in:
Johan Malm 2024-10-19 19:44:50 +01:00 committed by GitHub
parent 6918169aa3
commit c237ffa667
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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;
}