mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 02:19:49 +01:00
Merge pull request #78 from martinetd/fix_device_remove
libinput: fix segfault when handling non-wlr device removal
This commit is contained in:
commit
e2386043f6
1 changed files with 3 additions and 0 deletions
|
@ -112,6 +112,9 @@ static void handle_device_added(struct wlr_backend_state *state,
|
||||||
static void handle_device_removed(struct wlr_backend_state *state,
|
static void handle_device_removed(struct wlr_backend_state *state,
|
||||||
struct libinput_device *device) {
|
struct libinput_device *device) {
|
||||||
list_t *devices = libinput_device_get_user_data(device);
|
list_t *devices = libinput_device_get_user_data(device);
|
||||||
|
if (!devices) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
for (size_t i = 0; i < devices->length; i++) {
|
for (size_t i = 0; i < devices->length; i++) {
|
||||||
struct wlr_input_device *wlr_device = devices->items[i];
|
struct wlr_input_device *wlr_device = devices->items[i];
|
||||||
wlr_log(L_DEBUG, "Removing %s [%d:%d]", wlr_device->name,
|
wlr_log(L_DEBUG, "Removing %s [%d:%d]", wlr_device->name,
|
||||||
|
|
Loading…
Reference in a new issue