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 <ifreund@ifreund.xyz>
This commit is contained in:
Simon Ser 2022-06-05 09:44:55 +02:00 committed by Benjamin Tissoires
parent 808e660291
commit 99f63b03e7
4 changed files with 16 additions and 13 deletions

View file

@ -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);
}