summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkbLEDs.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c
index f617537cf..16826713e 100644
--- a/xkb/xkbLEDs.c
+++ b/xkb/xkbLEDs.c
@@ -714,10 +714,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;
}