diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2017-08-12 15:13:29 +0200 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2017-08-12 15:13:29 +0200 |
commit | 3e2cb5b5cf34df1d5bcc0fd02ba79ffb989c5c9f (patch) | |
tree | 36b0dd7cf75881ea3c1fc3e6301ed5f422c02567 /backend | |
parent | 2d6d2bcef9ed8883bae25b0559d7703728f4a901 (diff) |
libinput: fix segfault when handling non-wlr device removal
Diffstat (limited to 'backend')
-rw-r--r-- | backend/libinput/events.c | 3 |
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, |