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?
This commit is contained in:
parent
415c6df0da
commit
3106ba1116
|
@ -447,7 +447,7 @@ XkbIndicatorMapPtr map;
|
||||||
XkbDescPtr xkb;
|
XkbDescPtr xkb;
|
||||||
|
|
||||||
if ((sli->flags&XkbSLI_HasOwnState)==0)
|
if ((sli->flags&XkbSLI_HasOwnState)==0)
|
||||||
dev= inputInfo.keyboard;
|
return;
|
||||||
|
|
||||||
sli->usesBase&= ~which;
|
sli->usesBase&= ~which;
|
||||||
sli->usesLatched&= ~which;
|
sli->usesLatched&= ~which;
|
||||||
|
@ -462,7 +462,7 @@ XkbDescPtr xkb;
|
||||||
if (which&bit) {
|
if (which&bit) {
|
||||||
CARD8 what;
|
CARD8 what;
|
||||||
|
|
||||||
if (!XkbIM_InUse(map))
|
if (!map || !XkbIM_InUse(map))
|
||||||
continue;
|
continue;
|
||||||
sli->mapsPresent|= bit;
|
sli->mapsPresent|= bit;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue