From: Johan Malm Date: Sat, 19 Oct 2024 18:44:50 +0000 (+0100) Subject: cursor: guard against NULL dereference (#2250) X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=c237ffa667fd38be33640f59b89ab40738e092aa;p=proto%2Flabwc.git cursor: guard against NULL dereference (#2250) ...in apply_constraint() Reported-by: Blackb|rd --- 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; }