mirror of
https://github.com/labwc/labwc.git
synced 2026-03-06 01:40:15 -05:00
cursor: guard against NULL dereference (#2250)
...in apply_constraint() Reported-by: Blackb|rd
This commit is contained in:
parent
6918169aa3
commit
c237ffa667
1 changed files with 3 additions and 0 deletions
|
|
@ -749,6 +749,9 @@ constrain_cursor(struct server *server, struct wlr_pointer_constraint_v1
|
||||||
static void
|
static void
|
||||||
apply_constraint(struct seat *seat, struct wlr_pointer *pointer, double *x, double *y)
|
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) {
|
if (!seat->current_constraint || pointer->base.type != WLR_INPUT_DEVICE_POINTER) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue