From e172c89783326e2378e4793ff31a0f44210c5534 Mon Sep 17 00:00:00 2001 From: marha Date: Sat, 11 Sep 2010 08:41:00 +0000 Subject: xserver git update 11/9/2010 --- xorg-server/xkb/xkbLEDs.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'xorg-server/xkb/xkbLEDs.c') 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; } -- cgit v1.2.3