aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2017-03-13 20:27:50 +0100
committerUlrich Sibiller <uli42@gmx.de>2017-03-13 21:24:53 +0100
commit57081e55fdb8a90488574b732793bf1056f4c6ab (patch)
tree90bdf395914bb5dda2ff64539ae9ee0adf6cf74b /nx-X11/programs/Xserver/hw/nxagent
parent2c721f484d9177d28f27a4a33eb2cd0e6c4798fd (diff)
downloadnx-libs-57081e55fdb8a90488574b732793bf1056f4c6ab.tar.gz
nx-libs-57081e55fdb8a90488574b732793bf1056f4c6ab.tar.bz2
nx-libs-57081e55fdb8a90488574b732793bf1056f4c6ab.zip
Keystroke.c: fix code order
Do not use map before calling parse_keystroke_file() since it will malloc map.
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keystroke.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
index 9165a057a..501eea8b0 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
@@ -400,12 +400,14 @@ static enum nxagentSpecialKeystroke find_keystroke(XKeyEvent *X)
{
enum nxagentSpecialKeystroke ret = KEYSTROKE_NOTHING;
int keysyms_per_keycode_return;
- struct nxagentSpecialKeystrokeMap *cur = map;
+ struct nxagentSpecialKeystrokeMap *cur;
/* FIXME: we do late parsing here, this should be done at startup,
not at first keypress! */
parse_keystroke_file();
+ cur = map;
+
XlibKeySym *keysym = XGetKeyboardMapping(nxagentDisplay,
X->keycode,
1,