summaryrefslogtreecommitdiff
path: root/clients
diff options
context:
space:
mode:
authorManuel Stoeckl <code@mstoeckl.com>2019-08-07 23:21:16 -0400
committerSimon Ser <contact@emersion.fr>2019-08-12 18:43:30 +0000
commit324d846567abcdf79f94e8964161c4fda2498567 (patch)
tree756af77f210aebe2030edf64f99ea2357395be67 /clients
parent7216d4c44ba48de898cd83a3729069d0a85600c6 (diff)
downloadweston-324d846567abcdf79f94e8964161c4fda2498567.tar.gz
weston-324d846567abcdf79f94e8964161c4fda2498567.tar.bz2
weston-324d846567abcdf79f94e8964161c4fda2498567.zip
clients/simple-egl: Exit when display has an error
Check return values for wl_display_dispatch_* functions, so that the program stops running when the compositor that it is connected to crashes. Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Diffstat (limited to 'clients')
-rw-r--r--clients/simple-egl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/clients/simple-egl.c b/clients/simple-egl.c
index 1afde36a..2a23166e 100644
--- a/clients/simple-egl.c
+++ b/clients/simple-egl.c
@@ -866,9 +866,9 @@ main(int argc, char **argv)
* queued up as a side effect. */
while (running && ret != -1) {
if (window.wait_for_configure) {
- wl_display_dispatch(display.display);
+ ret = wl_display_dispatch(display.display);
} else {
- wl_display_dispatch_pending(display.display);
+ ret = wl_display_dispatch_pending(display.display);
redraw(&window, NULL, 0);
}
}