diff options
author | Mihai Moldovan <ionic@ionic.de> | 2018-02-28 00:55:13 +0100 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2018-02-28 00:55:13 +0100 |
commit | 1918bcb9c01fcf45727b514afb8ca8d978a2bf93 (patch) | |
tree | a678fc2c488d1f8121cc736575e682541f465e95 /nx-X11/programs/Xserver/xkb/xkbUtils.c | |
parent | a6cb8583adb16f299e968be4a8e99e903966e1d8 (diff) | |
parent | 00e3e95e5f40de2aaf5bb920bc51a311404889fc (diff) | |
download | nx-libs-1918bcb9c01fcf45727b514afb8ca8d978a2bf93.tar.gz nx-libs-1918bcb9c01fcf45727b514afb8ca8d978a2bf93.tar.bz2 nx-libs-1918bcb9c01fcf45727b514afb8ca8d978a2bf93.zip |
Merge branch 'uli42-pr/update_xkb' into 3.6.x
Attributes GH PR #648: https://github.com/ArcticaProject/nx-libs/pull/648
Diffstat (limited to 'nx-X11/programs/Xserver/xkb/xkbUtils.c')
-rw-r--r-- | nx-X11/programs/Xserver/xkb/xkbUtils.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/xkb/xkbUtils.c b/nx-X11/programs/Xserver/xkb/xkbUtils.c index f4b7db3c6..4adcc878d 100644 --- a/nx-X11/programs/Xserver/xkb/xkbUtils.c +++ b/nx-X11/programs/Xserver/xkb/xkbUtils.c @@ -674,6 +674,9 @@ CARD16 grp_mask; XkbStatePtr state= &xkbi->state; XkbCompatMapPtr map; + if (!state || !xkbi->desc || !xkbi->desc->ctrls || !xkbi->desc->compat) + return; + map= xkbi->desc->compat; grp_mask= map->groups[state->group].mask; state->compat_state = state->mods|grp_mask; @@ -733,6 +736,9 @@ XkbStatePtr state= &xkbi->state; XkbControlsPtr ctrls= xkbi->desc->ctrls; unsigned char grp; + if (!state || !ctrls) + return; + state->mods= (state->base_mods|state->latched_mods); state->mods|= state->locked_mods; state->lookup_mods= state->mods&(~ctrls->internal.mask); |