diff options
Diffstat (limited to 'src/evdev.c')
-rw-r--r-- | src/evdev.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c index 2aab97f..619bce6 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -308,7 +308,9 @@ EvdevDeviceIsVirtual(const char* devicenode) if (!udev) goto out; - stat(devicenode, &st); + if (stat(devicenode, &st) == -1) + goto out; + device = udev_device_new_from_devnum(udev, 'c', st.st_rdev); if (!device) |