dix: devices must have valuators before touch is initialized
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 13 May 2013 21:46:25 +0000 (07:46 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 15 May 2013 09:17:39 +0000 (19:17 +1000)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
dix/devices.c

index c514d77..c514cfe 100644 (file)
@@ -1647,6 +1647,7 @@ InitTouchClassDeviceStruct(DeviceIntPtr device, unsigned int max_touches,
 
     BUG_RETURN_VAL(device == NULL, FALSE);
     BUG_RETURN_VAL(device->touch != NULL, FALSE);
+    BUG_RETURN_VAL(device->valuator == NULL, FALSE);
 
     /* Check the mode is valid, and at least X and Y axes. */
     BUG_RETURN_VAL(mode != XIDirectTouch && mode != XIDependentTouch, FALSE);