diff options
| author | Simon Ser <contact@emersion.fr> | 2023-04-18 17:44:47 +0200 |
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2023-05-09 09:50:53 +0000 |
| commit | 8f2a33cffcdffcd1d2564c8f495053c5e1d385f7 (patch) | |
| tree | b60ddd76e37f749a88c61b6e6089c8853b317c66 /src | |
| parent | util: simplify wl_fixed_to_double() (diff) | |
| download | wayland-8f2a33cffcdffcd1d2564c8f495053c5e1d385f7.tar wayland-8f2a33cffcdffcd1d2564c8f495053c5e1d385f7.tar.gz wayland-8f2a33cffcdffcd1d2564c8f495053c5e1d385f7.tar.bz2 wayland-8f2a33cffcdffcd1d2564c8f495053c5e1d385f7.tar.lz wayland-8f2a33cffcdffcd1d2564c8f495053c5e1d385f7.tar.xz wayland-8f2a33cffcdffcd1d2564c8f495053c5e1d385f7.tar.zst wayland-8f2a33cffcdffcd1d2564c8f495053c5e1d385f7.zip | |
server: stop wl_display_run() on dispatch error
If wl_event_loop_dispatch() fails, we could enter an infinite loop,
repeatedly calling a failing wl_event_loop_dispatch() forever.
Signed-off-by: Simon Ser <contact@emersion.fr>
Diffstat (limited to 'src')
| -rw-r--r-- | src/wayland-server.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wayland-server.c b/src/wayland-server.c index d51acc6..51797bf 100644 --- a/src/wayland-server.c +++ b/src/wayland-server.c @@ -1490,7 +1490,9 @@ wl_display_run(struct wl_display *display) while (display->run) { wl_display_flush_clients(display); - wl_event_loop_dispatch(display->loop, -1); + if (wl_event_loop_dispatch(display->loop, -1) < 0) { + break; + } } } |
