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

Keyboard.c: guard XkbFreeKeyboard calls

manpage does not tell us if NULL is valid
parent 1b05251a
......@@ -723,8 +723,11 @@ XkbError:
fprintf(stderr, "nxagentKeyboardProc: XKB error.\n");
#endif
XkbFreeKeyboard(xkb, XkbAllComponentsMask, True);
xkb = NULL;
if (xkb)
{
XkbFreeKeyboard(xkb, XkbAllComponentsMask, True);
xkb = NULL;
}
free(model);
free(layout);
......@@ -874,14 +877,16 @@ XkbError:
goto XkbError;
}
XkbEnd:
if (nxagentOption(Shadow) == 1 && pDev && pDev->key)
{
NXShadowInitKeymap(&(pDev->key->curKeySyms));
}
XkbFreeKeyboard(xkb, XkbAllComponentsMask, True);
xkb = NULL;
if (xkb)
{
XkbFreeKeyboard(xkb, XkbAllComponentsMask, True);
xkb = NULL;
}
free(model);
free(layout);
......
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