summaryrefslogtreecommitdiff
path: root/src/xf86libinput.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xf86libinput.c')
-rw-r--r--src/xf86libinput.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xf86libinput.c b/src/xf86libinput.c
index f7a7553..934a312 100644
--- a/src/xf86libinput.c
+++ b/src/xf86libinput.c
@@ -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();
}