well, or at least we're not sure whether it is, so...
Signed-off-by: Peter Hutterer <[email protected]>
---
src/device.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/device.cpp b/src/device.cpp
index 5868036..50d0c28 100644
--- a/src/device.cpp
+++ b/src/device.cpp
@@ -69,6 +69,9 @@ static bool event_is_device(const std::string &path,
bool equal = false;
int fd = open(path.c_str(), O_RDONLY);
+ if (fd == -1)
+ return false;
+
if (ioctl(fd, EVIOCGNAME(sizeof(device_name)), device_name) != -1 &&
devname.compare(device_name) == 0) {
struct stat buf;
--
1.7.11.2
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel