dix: don't try to create events if we don't have a screen. #16898

A NULL screen may happen during server shutdown, when the output has been shut
down but the devices still generate events.

X.Org Bug 16898 <http://bugs.freedesktop.org/show_bug.cgi?id=16898>
This commit is contained in:
Peter Hutterer 2008-08-08 17:37:06 +09:30
parent d684f5760f
commit 465a9bb96e

View File

@ -814,6 +814,8 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
ms = GetTimeInMillis(); /* before pointer update to help precision */
/* Sanity checks. */
if (!scr) /* can happen during server shutdown */
return 0;
if (type != MotionNotify && type != ButtonPress && type != ButtonRelease)
return 0;
if (type != MotionNotify && !pDev->button)