From 99f63b03e7970093cf4b8028b21b26b656e14e6f Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sun, 5 Jun 2022 09:44:55 +0200 Subject: Remove remaining wl_signal_emit calls Replace them with wlr_signal_emit_safe, which correctly handles cases where a listener removes another listener. Reported-by: Isaac Freund --- render/allocator/allocator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'render') diff --git a/render/allocator/allocator.c b/render/allocator/allocator.c index 6b96e023..00dadd29 100644 --- a/render/allocator/allocator.c +++ b/render/allocator/allocator.c @@ -14,6 +14,7 @@ #include "render/allocator/drm_dumb.h" #include "render/allocator/shm.h" #include "render/wlr_renderer.h" +#include "util/signal.h" #if WLR_HAS_GBM_ALLOCATOR #include "render/allocator/gbm.h" @@ -158,7 +159,7 @@ void wlr_allocator_destroy(struct wlr_allocator *alloc) { if (alloc == NULL) { return; } - wl_signal_emit(&alloc->events.destroy, NULL); + wlr_signal_emit_safe(&alloc->events.destroy, NULL); alloc->impl->destroy(alloc); } -- cgit v1.2.3