Commit bbe2c2ab authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Keyboard.c: fix: handle empty string

parent cf24c658
......@@ -549,6 +549,12 @@ XkbError:
XkbComponentNamesRec names = {0};
char *rules = NULL, *variant = NULL, *options = NULL; /* use xkb default */
/* handle empty string like the NULL pointer */
if (nxagentKeyboard && nxagentKeyboard[0] == '\0')
{
SAFE_free(nxagentKeyboard);
}
#ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: Using XKB extension.\n");
fprintf(stderr, "nxagentKeyboardProc: nxagentKeyboard is [%s].\n", nxagentKeyboard ? nxagentKeyboard : "NULL");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment