From 158c3ef0dd190656a394abb43c389977b5df747c Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Wed, 22 Jun 2022 17:28:44 +0200 Subject: [PATCH] compositor: destroy the layout after the compositor This way the backends will the actual outputs. And at that point the backend knows the compositor is shutting down so it can handle this differently if necessary. Afterwards wet_compositor_destroy_layout() just deletes the remaining datastructures. Signed-off-by: Michael Olbrich --- compositor/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compositor/main.c b/compositor/main.c index 044c9df7..2f014404 100644 --- a/compositor/main.c +++ b/compositor/main.c @@ -3763,8 +3763,6 @@ wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_data) ret = wet.compositor->exit_code; out: - wet_compositor_destroy_layout(&wet); - /* free(NULL) is valid, and it won't be NULL if it's used */ free(wet.parsed_options); @@ -3772,6 +3770,7 @@ out: wl_protocol_logger_destroy(protologger); weston_compositor_destroy(wet.compositor); + wet_compositor_destroy_layout(&wet); weston_log_scope_destroy(protocol_scope); protocol_scope = NULL;