[X2Go-Commits] [nx-libs] 34/219: libNX_X11: add additional checks for dpy and xkb
git-admin at x2go.org
git-admin at x2go.org
Sat Sep 28 12:10:17 CEST 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch 3.6.x
in repository nx-libs.
commit 20353e96a390a029f7b3b18fc7ddd82eae98b935
Author: Ulrich Sibiller <uli42 at gmx.de>
Date: Wed May 15 19:54:24 2019 +0200
libNX_X11: add additional checks for dpy and xkb
We have seen crashes during session shutdown/connection problems
here. These patches should avoid them. There's no proper way to test
them, but they should do no harm..
Fixes ArcticaProject/nx-libs#801
Fixes https://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=695
---
nx-X11/lib/src/xkb/XKBBind.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/nx-X11/lib/src/xkb/XKBBind.c b/nx-X11/lib/src/xkb/XKBBind.c
index 068e8f2a0..ffe5ad9d7 100644
--- a/nx-X11/lib/src/xkb/XKBBind.c
+++ b/nx-X11/lib/src/xkb/XKBBind.c
@@ -108,7 +108,21 @@ XKeycodeToKeysym(Display *dpy,
_XkbCheckPendingRefresh(dpy, dpy->xkb_info);
+#ifdef NX_TRANS_SOCKET
+ /*
+ check again, we have seen cases where the connection broke
+ during CheckPendingEvents(), followed by a crash when accessing
+ dpy. See https://github.com/ArcticaProject/nx-libs/issues/801
+ */
+ if (_XkbUnavailable(dpy))
+ return _XKeycodeToKeysym(dpy, kc, col);
+#endif
+
xkb = dpy->xkb_info->desc;
+#ifdef NX_TRANS_SOCKET
+ if (xkb == NULL)
+ return _XKeycodeToKeysym(dpy, kc, col);
+#endif
if ((kc < xkb->min_key_code) || (kc > xkb->max_key_code))
return NoSymbol;
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
More information about the x2go-commits
mailing list