diff options
| author | Armin Preiml <apreiml@strohwolke.at> | 2025-08-14 18:43:36 +0200 |
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2025-08-16 16:22:15 +0200 |
| commit | c8a74c0c2de9fb257b1273ff6fbbbf7eb4e6a6da (patch) | |
| tree | 79f2a7a2d9bf6dbdddfa56e16588ff1132cc7e18 /main.c | |
| parent | c48320819613e81a09e0481aaa2b92c93fba0d73 (diff) | |
check for pending callback on destroy_surface
Avoids segfaults when a pending surface_frame_handle_done is invoked
after destruction of the associated surface.
This happened when an output was removed and the surfaces have been
destroyed, between render and the surface_frame_handle_done.
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -92,6 +92,9 @@ static void daemonize(void) { } static void destroy_surface(struct swaylock_surface *surface) { + if (surface->frame != NULL) { + wl_callback_destroy(surface->frame); + } wl_list_remove(&surface->link); if (surface->ext_session_lock_surface_v1 != NULL) { ext_session_lock_surface_v1_destroy(surface->ext_session_lock_surface_v1); |
