mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-03 13:40:34 +01:00
xkb: don't update LEDs if they don't exist. (Bug #13961)
In some weird cases we call this function when there is no SrvLedInfo on the
device. And it turns out null-pointer dereferences are bad.
X.Org Bug 13961 <http://bugs.freedesktop.org/show_bug.cgi?id=13961>
(cherry picked from commit d954f9c803)
This commit is contained in:
parent
e98027c3ac
commit
bc72ef3a15
1 changed files with 3 additions and 0 deletions
|
|
@ -63,6 +63,9 @@ XkbSrvLedInfoPtr sli;
|
|||
|
||||
sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0);
|
||||
|
||||
if (!sli)
|
||||
return update;
|
||||
|
||||
if (state_changes&(XkbModifierStateMask|XkbGroupStateMask))
|
||||
update|= sli->usesEffective;
|
||||
if (state_changes&(XkbModifierBaseMask|XkbGroupBaseMask))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue