]> git.mdlowis.com Git - proto/labwc.git/commitdiff
cursor: guard against NULL dereference (#2250)
authorJohan Malm <johanmalm@users.noreply.github.com>
Sat, 19 Oct 2024 18:44:50 +0000 (19:44 +0100)
committerGitHub <noreply@github.com>
Sat, 19 Oct 2024 18:44:50 +0000 (19:44 +0100)
...in apply_constraint()

Reported-by: Blackb|rd
src/input/cursor.c

index b230c95e62945f2795d71a40d59216d0ab36e1e8..513aff3a8ce476a780eed9fb207e43723c137e04 100644 (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;
        }