xkbcomp: Ensure user has supplied a rules name
parent
95dbbb8a7b
commit
83367a8d2d
|
@ -103,8 +103,10 @@ XkbcCompileKeymapFromRules(const char *rules, XkbRF_VarDefsPtr defs)
|
||||||
XkbComponentNamesPtr names;
|
XkbComponentNamesPtr names;
|
||||||
XkbcDescPtr xkb;
|
XkbcDescPtr xkb;
|
||||||
|
|
||||||
if (!rules)
|
if (!rules || strlen(rules) == 0) {
|
||||||
|
ERROR("No rules supplied\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
pathlen = snprintf(rulesPath, sizeof(rulesPath),
|
pathlen = snprintf(rulesPath, sizeof(rulesPath),
|
||||||
DFLT_XKB_CONFIG_ROOT "/rules/%s", rules);
|
DFLT_XKB_CONFIG_ROOT "/rules/%s", rules);
|
||||||
|
|
Loading…
Reference in New Issue