From 643ec33809fccd0a378190799cafcdf8521e3864 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 9 Jan 2022 23:19:47 +0100 Subject: main: check for errors in wl_display_dispatch() --- main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index f133d2e..5c6eed3 100644 --- a/main.c +++ b/main.c @@ -435,8 +435,12 @@ main(int argc, const char *const *argv) break; } - if (fds[0].revents & POLLIN) - wl_display_dispatch(display); + if (fds[0].revents & POLLIN) { + if (wl_display_dispatch(display) < 0) { + LOG_ERRNO("failed to dispatch Wayland events"); + break; + } + } if (fds[1].revents & POLLHUP) abort(); -- cgit v1.2.3