Commit 8469bfea authored by Samuel Thibault's avatar Samuel Thibault

Fix crash on XkbSetMap

Some devices may not have keyboard information.

Fixes #574
parent ff6b771e
......@@ -2383,6 +2383,9 @@ _XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq * req,
XkbSymMapPtr map;
int i;
if (!dev->key)
return 0;
xkbi = dev->key->xkbInfo;
xkb = xkbi->desc;
......@@ -2495,6 +2498,9 @@ _XkbSetMap(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq * req, char *values)
XkbSrvInfoPtr xkbi;
XkbDescPtr xkb;
if (!dev->key)
return Success;
xkbi = dev->key->xkbInfo;
xkb = xkbi->desc;
......
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