aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xkb/xkbLEDs.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-09-11 08:41:00 +0000
committermarha <marha@users.sourceforge.net>2010-09-11 08:41:00 +0000
commite172c89783326e2378e4793ff31a0f44210c5534 (patch)
tree7faed3d12aa20736af6a18fff1a5745cdf57de46 /xorg-server/xkb/xkbLEDs.c
parentc3d4371fec1beb5b71d21a90be5db6d32c4c185f (diff)
downloadvcxsrv-e172c89783326e2378e4793ff31a0f44210c5534.tar.gz
vcxsrv-e172c89783326e2378e4793ff31a0f44210c5534.tar.bz2
vcxsrv-e172c89783326e2378e4793ff31a0f44210c5534.zip
xserver git update 11/9/2010
Diffstat (limited to 'xorg-server/xkb/xkbLEDs.c')
-rw-r--r--xorg-server/xkb/xkbLEDs.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/xorg-server/xkb/xkbLEDs.c b/xorg-server/xkb/xkbLEDs.c
index 65d8739be..14767157b 100644
--- a/xorg-server/xkb/xkbLEDs.c
+++ b/xorg-server/xkb/xkbLEDs.c
@@ -556,6 +556,7 @@ Bool checkNames;
else if ((kf!=NULL)&&((kf->xkb_sli->flags&XkbSLI_IsDefault)!=0)) {
XkbDescPtr xkb;
xkb= dev->key->xkbInfo->desc;
+ sli= kf->xkb_sli;
sli->physIndicators= xkb->indicators->phys_indicators;
if (xkb->names->indicators!=sli->names) {
checkNames= TRUE;
@@ -584,6 +585,8 @@ Bool checkNames;
sli->maps= NULL;
sli->names= NULL;
}
+ else
+ return NULL;
if ((sli->names==NULL)&&(needed_parts&XkbXI_IndicatorNamesMask))
sli->names= calloc(XkbNumIndicators, sizeof(Atom));
if ((sli->maps==NULL)&&(needed_parts&XkbXI_IndicatorMapsMask))
@@ -714,10 +717,12 @@ XkbSrvLedInfoPtr sli;
}
}
}
- if ((sli->names==NULL)&&(needed_parts&XkbXI_IndicatorNamesMask))
- sli->names= calloc(XkbNumIndicators, sizeof(Atom));
- if ((sli->maps==NULL)&&(needed_parts&XkbXI_IndicatorMapsMask))
- sli->maps= calloc(XkbNumIndicators, sizeof(XkbIndicatorMapRec));
+ if (sli) {
+ if ((sli->names==NULL)&&(needed_parts&XkbXI_IndicatorNamesMask))
+ sli->names= calloc(XkbNumIndicators, sizeof(Atom));
+ if ((sli->maps==NULL)&&(needed_parts&XkbXI_IndicatorMapsMask))
+ sli->maps= calloc(XkbNumIndicators, sizeof(XkbIndicatorMapRec));
+ }
return sli;
}