diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-04-13 11:48:06 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-04-13 11:48:06 +0930 |
commit | 3106ba1116e3b9d893f66a93e4a91cc61e23226a (patch) | |
tree | 343d29ebb1cdbd6690146e058e894247b621c0b8 /xkb | |
parent | 415c6df0da1197d487456b4c48e2e28e7ded8b8e (diff) |
xkb: two fixes to avoid server crashes.
- map can be NULL in some cases, so don't try to dereference it.
- don't default to inputInfo.keyboard
This is firefighting, I presume something in the class copy may have gone
wrong to get a NULL map in the first instance?
Diffstat (limited to 'xkb')
-rw-r--r-- | xkb/xkbLEDs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c index d7ada5749..1ea3e1116 100644 --- a/xkb/xkbLEDs.c +++ b/xkb/xkbLEDs.c @@ -447,7 +447,7 @@ XkbIndicatorMapPtr map; XkbDescPtr xkb; if ((sli->flags&XkbSLI_HasOwnState)==0) - dev= inputInfo.keyboard; + return; sli->usesBase&= ~which; sli->usesLatched&= ~which; @@ -462,7 +462,7 @@ XkbDescPtr xkb; if (which&bit) { CARD8 what; - if (!XkbIM_InUse(map)) + if (!map || !XkbIM_InUse(map)) continue; sli->mapsPresent|= bit; |