Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
+diff -Naur a/xbmc/input/linux/LinuxInputDevices.cpp b/xbmc/input/linux/LinuxInputDevices.cpp
+--- a/xbmc/input/linux/LinuxInputDevices.cpp 2013-02-26 06:14:43.000000000 -0500
++++ b/xbmc/input/linux/LinuxInputDevices.cpp 2013-03-04 14:12:57.987335260 -0500
+@@ -1066,6 +1066,13 @@
+ /* fill device info structure */
+ GetInfo(fd);
+
++ if (m_deviceType==LI_DEVICE_NONE)
++ {
++ CLog::Log(LOGERROR, "CLinuxInputDevice %s: Unknown device type.", m_deviceName);
++ close(fd);
++ return false;
++ }
++
+ if (m_deviceType & LI_DEVICE_KEYBOARD)
+ SetupKeyboardAutoRepeat(fd);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment