mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
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:
parent
808e660291
commit
99f63b03e7
4 changed files with 16 additions and 13 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue