summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorBerke Güzel <wenekar1@gmail.com>2026-10-12 23:00:02 +0300
committerBerke Güzel <wenekar1@gmail.com>2026-10-12 23:00:02 +0300
commit36b44f2a14571da4389d982c67c4467bc6dd8d5f (patch)
tree7ced08bc180616cae11f13157c9a2df27c70b8f0 /src/common
parente389c0fe03a53dd295fee138db7acf1861710370 (diff)
fix(app): destroy remaining surfaces before closing display on shutdown
Diffstat (limited to 'src/common')
-rw-r--r--src/common/app.c9
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) {