diff options
Diffstat (limited to 'dix')
-rw-r--r-- | dix/events.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dix/events.c b/dix/events.c index 8dff29973..eb7bd9296 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1115,13 +1115,14 @@ NoticeEventTime(InternalEvent *ev) void EnqueueEvent(InternalEvent *ev, DeviceIntPtr device) { - QdEventPtr tail; + QdEventPtr tail = NULL; QdEventPtr qe; SpritePtr pSprite = device->spriteInfo->sprite; int eventlen; DeviceEvent *event = &ev->device_event; - tail = list_last_entry(&syncEvents.pending, QdEventRec, next); + if (!list_is_empty(&syncEvents.pending)) + tail = list_last_entry(&syncEvents.pending, QdEventRec, next); NoticeTime((InternalEvent*)event); |