mirror of
https://github.com/X11Libre/xf86-input-libinput.git
synced 2026-03-24 01:24:04 +00:00
Don't run past the last element in the list
If there is no (other) libinput device in the current device list, we'd eventually end up with next == NULL, causing a segfault. Fixes #60
This commit is contained in:
@@ -1500,7 +1500,7 @@ swap_registered_device(InputInfoPtr pInfo)
|
||||
return;
|
||||
|
||||
next = xf86FirstLocalDevice();
|
||||
while (next == pInfo || !is_libinput_device(next))
|
||||
while (next && (next == pInfo || !is_libinput_device(next)))
|
||||
next = next->next;
|
||||
|
||||
input_lock();
|
||||
|
||||
Reference in New Issue
Block a user