Don't try to enable a NULL device

If there is no other libinput device in our list (and next is thus NULL),
skip the xf86AddEnabledDevice() call.

Fixes #60
This commit is contained in:
Peter Hutterer
2023-07-10 09:04:40 +10:00
parent 310db4206f
commit 5e20d16dd4

View File

@@ -1505,7 +1505,8 @@ swap_registered_device(InputInfoPtr pInfo)
input_lock();
xf86RemoveEnabledDevice(pInfo);
xf86AddEnabledDevice(next);
if (next)
xf86AddEnabledDevice(next);
driver_context.registered_InputInfoPtr = next;
input_unlock();
}