From 28c0abbc579add426b3d520fc9042d0a376662a8 Mon Sep 17 00:00:00 2001 From: emersion Date: Thu, 17 Jan 2019 12:39:33 +0100 Subject: [PATCH] loop: fix loop_add_fd when called multiple times --- loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loop.c b/loop.c index 592d3b1..b7faede 100644 --- a/loop.c +++ b/loop.c @@ -124,7 +124,7 @@ void loop_add_fd(struct loop *loop, int fd, short mask, } event->callback = callback; event->data = data; - wl_list_insert(&loop->fd_events, &event->link); + wl_list_insert(loop->fd_events.prev, &event->link); struct pollfd pfd = {fd, mask, 0};