evdev: don't pass null path to the kernel

This commit is contained in:
Tillmann Karras 2015-08-15 12:51:34 +02:00
parent 0b73a9ed25
commit b3ff66dc7a
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ void Init(std::vector<Core::Device*> &controllerDevices)
const char* devnode = udev_device_get_devnode(dev);
// We only care about devices which we have read/write access to.
if (access(devnode, W_OK) == 0)
if (devnode && access(devnode, W_OK) == 0)
{
// Unfortunately udev gives us no way to filter out the non event device interfaces.
// So we open it and see if it works with evdev ioctls or not.