summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp')
-rw-r--r--Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp b/Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp
index 68294ebfc2..f1dcbaa79a 100644
--- a/Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp
+++ b/Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp
@@ -113,9 +113,10 @@ KeyboardMouse::Key::Key(Display* const display, KeyCode keycode)
if (keysym >= 97 && keysym <= 122)
keysym -= 32;
- // 0x0110ffff is the top of the unicode character range according to keysymdef.h
- // although it is probably more than we need.
- if (keysym == NoSymbol || keysym > 0x0110ffff)
+ // 0x0110ffff is the top of the unicode character range according
+ // to keysymdef.h although it is probably more than we need.
+ if (keysym == NoSymbol || keysym > 0x0110ffff ||
+ XKeysymToString(keysym) == NULL)
m_keyname = std::string();
else
m_keyname = std::string(XKeysymToString(keysym));