From b8b52e15688b0e080d4b459f1701c29819d41728 Mon Sep 17 00:00:00 2001 From: Boram Park Date: Thu, 3 Dec 2015 08:36:13 +0900 Subject: check if user_handler_list inited Change-Id: I95abd7e8cc8d0485a7cc06dca54bfa46775eb8aa --- xf86drmMode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3