xfree86: fix wrong IsMaster() check causing crashes.

Crashes caused by dereferencing NULL if the path was executed for a floating
slave device.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2009-07-03 09:52:04 +10:00
parent 50a2a8dc76
commit 97e29ffb5b

View File

@ -303,8 +303,7 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs,
if (pCurs == NullCursor) { /* means we're supposed to remove the cursor */
if (ScreenPriv->SWCursor ||
!(pDev == inputInfo.pointer || !IsMaster(pDev) &&
GetMaster(pDev->u.master, MASTER_POINTER) == inputInfo.pointer))
!(GetMaster(pDev, MASTER_POINTER) == inputInfo.pointer))
(*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, x, y);
else if (ScreenPriv->isUp) {
xf86SetCursor(pScreen, NullCursor, x, y);