aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-08-12 09:22:29 -0400
committerGitHub <noreply@github.com>2017-08-12 09:22:29 -0400
commite2386043f6623c0961c7ed88c4858ffcfe31007f (patch)
treeb9d95c51d19f019daf6239b01d0a1e2c9c27702d /backend
parent5ba7560782b222e480c8a7e0c4f48d6839bd6830 (diff)
parent3e2cb5b5cf34df1d5bcc0fd02ba79ffb989c5c9f (diff)
Merge pull request #78 from martinetd/fix_device_remove
libinput: fix segfault when handling non-wlr device removal
Diffstat (limited to 'backend')
-rw-r--r--backend/libinput/events.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/backend/libinput/events.c b/backend/libinput/events.c
index 9afdab21..aa5c315d 100644
--- a/backend/libinput/events.c
+++ b/backend/libinput/events.c
@@ -112,6 +112,9 @@ static void handle_device_added(struct wlr_backend_state *state,
static void handle_device_removed(struct wlr_backend_state *state,
struct libinput_device *device) {
list_t *devices = libinput_device_get_user_data(device);
+ if (!devices) {
+ return;
+ }
for (size_t i = 0; i < devices->length; i++) {
struct wlr_input_device *wlr_device = devices->items[i];
wlr_log(L_DEBUG, "Removing %s [%d:%d]", wlr_device->name,