diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-03-09 09:05:10 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-03-09 09:23:57 +1000 |
commit | 2c49e21a815632fc1addd04dde96592237757a2e (patch) | |
tree | 7594c99ca913a701162878d348df99144ce7e84d | |
parent | 4361b3efa0da5e85da7f0506c81dba31e59dc897 (diff) |
Check button label before fetching the Atom from the server. (#20524)
The server doesn't like NULL names, so don't call XIGetKnownProperty for
labels that don't exist.
X.Org Bug 20524 <http://bugs.freedesktop.org/show_bug.cgi?id=20524>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Peter Henriksson
-rw-r--r-- | src/evdev.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/evdev.c b/src/evdev.c index 519fd6a..04bce96 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -2002,6 +2002,9 @@ EvdevInitProperty(DeviceIntPtr dev) int group = (button % 0x100)/16; int idx = button - ((button/16) * 16); + if (!btn_labels[group][idx]) + continue; + atom = XIGetKnownProperty(btn_labels[group][idx]); if (!atom) continue; |