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:
+3
-1
@@ -4155,7 +4155,9 @@ WL_EXPORT void
|
|||||||
weston_compositor_exit_with_code(struct weston_compositor *compositor,
|
weston_compositor_exit_with_code(struct weston_compositor *compositor,
|
||||||
int exit_code)
|
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);
|
wl_display_terminate(compositor->wl_display);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user