Xi: check if source has a key class before copying.

This commit is contained in:
Peter Hutterer 2008-04-08 22:09:11 +09:30
parent 6271df6953
commit ea05cf0813

View File

@ -378,7 +378,7 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to)
} }
ALLOC_COPY_CLASS_IF(key, KeyClassRec); ALLOC_COPY_CLASS_IF(key, KeyClassRec);
if (to->key) if (to->key && from->key)
{ {
#ifdef XKB #ifdef XKB
to->key->xkbInfo = NULL; to->key->xkbInfo = NULL;