diff options
author | runge <runge> | 2006-07-04 23:47:28 +0000 |
---|---|---|
committer | runge <runge> | 2006-07-04 23:47:28 +0000 |
commit | 06af02b5accbe88a7fad28dceae5b85a0f11e4ad (patch) | |
tree | 9f2efce1b6b871a10d3d8865753dc4bafda84cee /x11vnc/xwrappers.c | |
parent | 93ca945acb85760ce3661debf5badb570ffe0454 (diff) | |
download | libtdevnc-06af02b5accbe88a7fad28dceae5b85a0f11e4ad.tar.gz libtdevnc-06af02b5accbe88a7fad28dceae5b85a0f11e4ad.zip |
x11vnc: check all XKeysymToString() return values.
Diffstat (limited to 'x11vnc/xwrappers.c')
-rw-r--r-- | x11vnc/xwrappers.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/x11vnc/xwrappers.c b/x11vnc/xwrappers.c index b70d205..63e231f 100644 --- a/x11vnc/xwrappers.c +++ b/x11vnc/xwrappers.c @@ -547,9 +547,9 @@ static void upup_downdown_warning(KeyCode key, Bool down) { RAWFB_RET_VOID if ((down ? 1:0) == keycode_state[(int) key]) { + char *str = XKeysymToString(XKeycodeToKeysym(dpy, key, 0)); rfbLog("XTestFakeKeyEvent: keycode=0x%x \"%s\" is *already* " - "%s\n", key, XKeysymToString(XKeycodeToKeysym(dpy, key, 0)), - down ? "down":"up"); + "%s\n", key, str ? str : "null", down ? "down":"up"); } } @@ -589,9 +589,9 @@ void XTestFakeKeyEvent_wr(Display* dpy, KeyCode key, Bool down, RAWFB_RET_VOID if (debug_keyboard) { + char *str = XKeysymToString(XKeycodeToKeysym(dpy, key, 0)); rfbLog("XTestFakeKeyEvent(dpy, keycode=0x%x \"%s\", %s)\n", - key, XKeysymToString(XKeycodeToKeysym(dpy, key, 0)), - down ? "down":"up"); + key, str ? str : "null", down ? "down":"up"); } if (first) { init_track_keycode_state(); |