From 987496c711d0f1022676f8457f50cc1a1bb72d5c Mon Sep 17 00:00:00 2001 From: Sung-Jin Park Date: Sun, 6 Jun 2021 12:24:42 +0900 Subject: [PATCH] pepper-inotify: fix to refer to event source only when it's valid Change-Id: I80d41932d29f76a1909f0b4d449ce00267ef644f Signed-off-by: Sung-Jin Park --- src/lib/inotify/pepper-inotify.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/inotify/pepper-inotify.c b/src/lib/inotify/pepper-inotify.c index db2c4f1..4115472 100644 --- a/src/lib/inotify/pepper-inotify.c +++ b/src/lib/inotify/pepper-inotify.c @@ -87,8 +87,10 @@ _inotify_fd_read(int fd, uint32_t mask, void *data) PEPPER_ERROR("The event source will be disabled and the fd will be closed.\n"); if (watch_data->event_source) + { wl_event_source_fd_update(watch_data->event_source, (uint32_t)0); - wl_event_source_remove(watch_data->event_source); + wl_event_source_remove(watch_data->event_source); + } return 0; } -- 2.34.1