diff options
author | Kirill Primak <vyivel@eclair.cafe> | 2024-01-17 02:07:04 +0300 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2024-01-17 15:44:37 +0000 |
commit | db69dcf767679d57e31c3cf5f8bb91abf45fc6bc (patch) | |
tree | 7b6a03130bca295925c24b21b098c2a3b6936f8c | |
parent | 20b99ed85434837f31107337631f003de235b4d4 (diff) |
backend/x11: handle touchpoint allocation failure
-rw-r--r-- | backend/x11/input_device.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/backend/x11/input_device.c b/backend/x11/input_device.c index b3bd77da..02d4210f 100644 --- a/backend/x11/input_device.c +++ b/backend/x11/input_device.c @@ -233,6 +233,10 @@ void handle_x11_xinput_event(struct wlr_x11_backend *x11, } struct wlr_x11_touchpoint *touchpoint = calloc(1, sizeof(*touchpoint)); + if (!touchpoint) { + return; + } + touchpoint->x11_id = ev->detail; touchpoint->wayland_id = id; wl_list_init(&touchpoint->link); |