diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-12 23:00:02 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-12 23:00:02 +0300 |
| commit | 36b44f2a14571da4389d982c67c4467bc6dd8d5f (patch) | |
| tree | 7ced08bc180616cae11f13157c9a2df27c70b8f0 | |
| parent | e389c0fe03a53dd295fee138db7acf1861710370 (diff) | |
fix(app): destroy remaining surfaces before closing display on shutdown
| -rw-r--r-- | src/common/app.c | 9 |
1 files changed, 5 insertions, 4 deletions
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) { |
