diff options
author | Boram Park <boram1288.park@samsung.com> | 2015-12-03 08:36:13 +0900 |
---|---|---|
committer | Joonyoung Shim <jy0922.shim@samsung.com> | 2017-02-15 13:37:34 +0900 |
commit | 4e4455b2be84864b816e1d9237e6a155bbcd8364 (patch) | |
tree | f3bd9fdca731f49c7978e06bc202304f212f369b | |
parent | ffe1c80e7b97709ec9a8c2f4b150febf0b949cc1 (diff) | |
download | libdrm-4e4455b2be84864b816e1d9237e6a155bbcd8364.tar.gz libdrm-4e4455b2be84864b816e1d9237e6a155bbcd8364.tar.bz2 libdrm-4e4455b2be84864b816e1d9237e6a155bbcd8364.zip |
check if user_handler_list inited
Change-Id: I95abd7e8cc8d0485a7cc06dca54bfa46775eb8aa
-rw-r--r-- | xf86drmMode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xf86drmMode.c b/xf86drmMode.c index 82daa43b..1d60ae27 100644 --- a/xf86drmMode.c +++ b/xf86drmMode.c @@ -987,8 +987,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) |