diff options
Diffstat (limited to 'nx-X11/programs')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 65c4d20fe..84121c1db 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -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); |