summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-04-07 19:36:27 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-04-07 19:36:27 +1000
commit6c3b633299f12051fcf37fb8439f358de876cf03 (patch)
tree91d35cc77632048d9cb2c0c932fdea0b98f5395e /xkb
parentadf21dba7617542f08309415e315d4b2699c10e0 (diff)
parent0cfd48130842685828e0662a27272a3a65facd23 (diff)
Merge branch 'master' into xi2
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkb.c4
-rw-r--r--xkb/xkbLEDs.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/xkb/xkb.c b/xkb/xkb.c
index ba1a4f6fd..e7c9a312d 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -605,7 +605,7 @@ ProcXkbLatchLockState(ClientPtr client)
for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) {
if ((tmpd == dev) || (!tmpd->isMaster && tmpd->u.master == dev)) {
- if (!tmpd->key->xkbInfo)
+ if (!tmpd->key || !tmpd->key->xkbInfo)
continue;
oldState = tmpd->key->xkbInfo->state;
@@ -744,6 +744,8 @@ ProcXkbSetControls(ClientPtr client)
CHK_MASK_LEGAL(0x01, stuff->changeCtrls, XkbAllControlsMask);
for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) {
+ if (!tmpd->key || !tmpd->key->xkbInfo)
+ continue;
if ((tmpd == dev) || (!tmpd->isMaster && tmpd->u.master == dev)) {
xkbi = tmpd->key->xkbInfo;
ctrl = xkbi->desc->ctrls;
diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c
index c61296b18..a70ac841d 100644
--- a/xkb/xkbLEDs.c
+++ b/xkb/xkbLEDs.c
@@ -643,7 +643,7 @@ XkbCopySrvLedInfo( DeviceIntPtr from,
else
sli_new->fb.lf = lf;
- if (sli_new->flags & XkbSLI_IsDefault) {
+ if (!(sli_new->flags & XkbSLI_IsDefault)) {
sli_new->names= _XkbTypedCalloc(XkbNumIndicators,Atom);
sli_new->maps= _XkbTypedCalloc(XkbNumIndicators,XkbIndicatorMapRec);
} /* else sli_new->names/maps is pointing to