diff options
author | Daniel Eklöf <daniel@ekloef.se> | 2022-01-09 23:19:47 +0100 |
---|---|---|
committer | Daniel Eklöf <daniel@ekloef.se> | 2022-01-09 23:19:47 +0100 |
commit | 643ec33809fccd0a378190799cafcdf8521e3864 (patch) | |
tree | a6af9645c5cd67db446de7f8bbea9ea7c12c84b8 | |
parent | 530c14aa235c205ddecfc522cd836cc12d2dd10d (diff) | |
download | wbg-643ec33809fccd0a378190799cafcdf8521e3864.tar.gz |
main: check for errors in wl_display_dispatch()
-rw-r--r-- | main.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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(); |