Add a NULL check before before strcmp'ing
The names array can have NULL entries for some virtual modifier indexes. Signed-off-by: Ran Benita <ran234@gmail.com>master
parent
9813778e73
commit
84ec6b61a7
|
@ -242,7 +242,8 @@ ResolveVirtualModifier(ExprDef * def, struct xkb_desc *xkb,
|
|||
const char *name = XkbcAtomText(def->value.str);
|
||||
for (i = 0, bit = 1; i < XkbNumVirtualMods; i++, bit <<= 1)
|
||||
{
|
||||
if ((info->available & bit) && strcmp(names->vmods[i], name) == 0)
|
||||
if ((info->available & bit) && names->vmods[i] &&
|
||||
strcmp(names->vmods[i], name) == 0)
|
||||
{
|
||||
val_rtrn->uval = i;
|
||||
return True;
|
||||
|
|
Loading…
Reference in New Issue