Xi: check for existence of the button class before accessing it

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2009-03-17 15:47:57 +10:00
parent e8094d8f3f
commit 5ae129baef
1 changed files with 2 additions and 0 deletions

View File

@ -843,6 +843,8 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event)
for (sd = inputInfo.devices; sd; sd = sd->next) {
if (sd->isMaster || sd->u.master != device)
continue;
if (!sd->button)
continue;
if ((sd->button->down[key>>3] & bit) != 0)
return DONT_PROCESS;
}