Commit 4bcf4391 authored by Peter Hutterer's avatar Peter Hutterer
Browse files

dix: use BUG_RETURN_VAL for pairing errors


Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: default avatarChase Douglas <chase.douglas@canonical.com>
Reviewed-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
parent 642569fc
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment