Unverified Commit 789d3a37 authored by Mike Gabriel's avatar Mike Gabriel

Merge branch 'uli42-pr/fix_xkb_crash' into 3.6.x

parents 6981e9bb 20353e96
......@@ -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;
......
......@@ -685,6 +685,10 @@ unsigned act;
else group= newGroup;
}
else {
#ifdef NXAGENT_SERVER
/* we have seen division by zero here */
if (ctrls->num_groups != 0)
#endif
group%= ctrls->num_groups;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment