dix: use BUG_RETURN_VAL for pairing errors

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
Peter Hutterer 2012-05-10 15:32:47 +10:00
parent 642569fc79
commit 4bcf43919a

View File

@ -365,13 +365,12 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent)
/* mode doesn't matter */
EnterWindow(dev, screenInfo.screens[0]->root, NotifyAncestor);
}
else if ((other = NextFreePointerDevice()) == NULL) {
ErrorF("[dix] cannot find pointer to pair with. "
"This is a bug.\n");
return FALSE;
}
else
else {
other = NextFreePointerDevice();
BUG_RETURN_VAL_MSG(other == NULL, FALSE,
"[dix] cannot find pointer to pair with.\n");
PairDevices(NULL, other, dev);
}
}
else {
if (dev->coreEvents)