xkbcomp: Don't dereference NULL VarDefsPtr

master
Dan Nicholson 2009-04-04 12:17:50 -07:00
parent 99d2f4a5eb
commit fdd8a9ec1b
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ XkbcCompileKeymapFromRules(const char *rules, XkbRF_VarDefsPtr defs)
XkbComponentNamesPtr names;
XkbcDescPtr xkb;
if (ISEMPTY(rules) || ISEMPTY(defs->layout)) {
if (ISEMPTY(rules) || !defs || ISEMPTY(defs->layout)) {
ERROR("rules and layout required to generate XKB keymap\n");
return NULL;
}