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:
parent
642569fc79
commit
4bcf43919a
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user