diff --git a/main.c b/main.c index df040e1..5057da0 100644 --- a/main.c +++ b/main.c @@ -1208,7 +1208,10 @@ int main(int argc, char **argv) { struct wl_registry *registry = wl_display_get_registry(state.display); wl_registry_add_listener(registry, ®istry_listener, &state); - wl_display_roundtrip(state.display); + if (wl_display_roundtrip(state.display) == -1) { + swaylock_log(LOG_ERROR, "wl_display_roundtrip() failed"); + return EXIT_FAILURE; + } if (!state.compositor) { swaylock_log(LOG_ERROR, "Missing wl_compositor");