aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/lib/X11')
-rw-r--r--nx-X11/lib/X11/StrKeysym.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/nx-X11/lib/X11/StrKeysym.c b/nx-X11/lib/X11/StrKeysym.c
index 98629ed18..a05e755e9 100644
--- a/nx-X11/lib/X11/StrKeysym.c
+++ b/nx-X11/lib/X11/StrKeysym.c
@@ -159,6 +159,8 @@ XStringToKeysym(_Xconst char *s)
if (strncmp(s, "XF86_", 5) == 0) {
KeySym ret;
char *tmp = strdup(s);
+ if (!tmp)
+ return NoSymbol;
memmove(&tmp[4], &tmp[5], strlen(s) - 5 + 1);
ret = XStringToKeysym(tmp);
free(tmp);