summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xf86drmMode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xf86drmMode.c b/xf86drmMode.c
index b8381159..24c8851e 100644
--- a/xf86drmMode.c
+++ b/xf86drmMode.c
@@ -962,8 +962,10 @@ int drmHandleEvent(int fd, drmEventContextPtr evctx)
{
struct drm_user_handler_data *data;
int ret = -1;
+ if (!user_handler_list_init)
+ break;
DRMLISTFOREACHENTRY(data, &user_handler_list, link) {
- if (data->fd == fd && data->handler)
+ if (data->handler)
{
ret = data->handler(e);
if (ret == 0)