From 36b44f2a14571da4389d982c67c4467bc6dd8d5f Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Mon, 12 Oct 2026 23:00:02 +0300 Subject: fix(app): destroy remaining surfaces before closing display on shutdown --- src/common/app.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/common/app.c') diff --git a/src/common/app.c b/src/common/app.c index 3890a1d..5350f85 100644 --- a/src/common/app.c +++ b/src/common/app.c @@ -514,13 +514,14 @@ int yasl_run(const struct yasl_app_desc *desc) desc->quit(desc->userdata, d); } - d->app_runner = NULL; + /* Destroy any surfaces that were not explicitly destroyed by the application */ while (runner.surfaces) { - struct app_surface *next = runner.surfaces->next; - free(runner.surfaces); - runner.surfaces = next; + struct yasl_surface *s = runner.surfaces->surface; + yasl_surface_destroy(s); } + d->app_runner = NULL; + pthread_mutex_lock(&runner.user_event_mutex); struct user_event_node *node = runner.user_event_head; while (node) { -- cgit v1.2.3