check for invalid keys properly

This commit is contained in:
Dana Jansens 2003-03-26 13:25:21 +00:00
parent dffe960084
commit 46e549700a

View file

@ -51,7 +51,7 @@ gboolean translate_key(char *str, guint *state, guint *keycode)
goto translation_fail;
}
*keycode = XKeysymToKeycode(ob_display, sym);
if (!keycode) {
if (!*keycode) {
g_warning("Key '%s' does not exist on the display.", l);
goto translation_fail;
}