From c237ffa667fd38be33640f59b89ab40738e092aa Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Sat, 19 Oct 2024 19:44:50 +0100 Subject: [PATCH] cursor: guard against NULL dereference (#2250) ...in apply_constraint() Reported-by: Blackb|rd --- src/input/cursor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/input/cursor.c b/src/input/cursor.c index b230c95e..513aff3a 100644 --- a/src/input/cursor.c +++ b/src/input/cursor.c @@ -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; } -- 2.52.0