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>
This commit is contained in:
parent
c336f06e70
commit
f5ef88ff60
@ -4155,7 +4155,9 @@ WL_EXPORT void
|
||||
weston_compositor_exit_with_code(struct weston_compositor *compositor,
|
||||
int exit_code)
|
||||
{
|
||||
if (compositor->exit_code == EXIT_SUCCESS)
|
||||
compositor->exit_code = exit_code;
|
||||
|
||||
wl_display_terminate(compositor->wl_display);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user