compositor: do not overwrite error exit code

If there are several things that cause an exit, keep the error code from
the first one, not the last one. The latter ones could be just fallout
from the first.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
dev
Pekka Paalanen 10 years ago
parent c336f06e70
commit f5ef88ff60
  1. 4
      src/compositor.c

@ -4155,7 +4155,9 @@ WL_EXPORT void
weston_compositor_exit_with_code(struct weston_compositor *compositor,
int exit_code)
{
compositor->exit_code = exit_code;
if (compositor->exit_code == EXIT_SUCCESS)
compositor->exit_code = exit_code;
wl_display_terminate(compositor->wl_display);
}

Loading…
Cancel
Save