xkbcomp: Ensure at least keycodes supplied in components It seems that at least a non-empty keycodes component is required to compile a XkbcDescPtr.
diff --git a/src/xkbcomp/xkbcomp.c b/src/xkbcomp/xkbcomp.c
index 3cfde6a..450c459 100644
--- a/src/xkbcomp/xkbcomp.c
+++ b/src/xkbcomp/xkbcomp.c
@@ -155,6 +155,11 @@ XkbcCompileKeymapFromComponents(XkbComponentNamesPtr ktcsg)
XkbFile *file, *mapToUse;
XkbcDescPtr xkb;
+ if (!ktcsg || ISEMPTY(ktcsg->keycodes)) {
+ ERROR("keycodes required to generate XKB keymap\n");
+ goto fail;
+ }
+
if (!(file = XkbKeymapFileFromComponents(ktcsg))) {
ERROR("failed to generate parsed XKB file from components\n");
goto fail;