aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-02-24 00:07:41 +0100
committerSimon Ser <contact@emersion.fr>2023-02-24 00:07:41 +0100
commit8619ffab2142d8c0022bfa86e1ff7a3539c01f46 (patch)
treec97308ec4c01a5d4add9fd17cc0b020d6a74225b /render
parent254c5fc75225ef970ae1786dc17a129ab33c844e (diff)
swapchain: remove allocator listener on destroy
Past that point the wlr_allocator is gone and the listeners are invalidated.
Diffstat (limited to 'render')
-rw-r--r--render/swapchain.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/render/swapchain.c b/render/swapchain.c
index 943879bb..5ccf812e 100644
--- a/render/swapchain.c
+++ b/render/swapchain.c
@@ -11,6 +11,8 @@ static void swapchain_handle_allocator_destroy(struct wl_listener *listener,
struct wlr_swapchain *swapchain =
wl_container_of(listener, swapchain, allocator_destroy);
swapchain->allocator = NULL;
+ wl_list_remove(&swapchain->allocator_destroy.link);
+ wl_list_init(&swapchain->allocator_destroy.link);
}
struct wlr_swapchain *wlr_swapchain_create(