mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
backend/session: fix crash on udev device remove event
libwayland adds phantom listeners here:
d81525a235/src/wayland-server.c (L2378)
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3982
This commit is contained in:
parent
2ec4012559
commit
406aa5f7f5
1 changed files with 4 additions and 1 deletions
|
|
@ -367,7 +367,10 @@ void wlr_session_close_file(struct wlr_session *session,
|
|||
}
|
||||
|
||||
assert(wl_list_empty(&dev->events.change.listener_list));
|
||||
assert(wl_list_empty(&dev->events.remove.listener_list));
|
||||
// TODO: assert that the "remove" listener list is empty as well. Listeners
|
||||
// will typically call wlr_session_close_file() in response, and
|
||||
// wl_signal_emit_mutable() installs two phantom listeners, so we'd count
|
||||
// these two.
|
||||
|
||||
close(dev->fd);
|
||||
wl_list_remove(&dev->link);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue