mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-19 05:34:11 -04:00
xwayland: fix double free wlr_xwayland_shell_v1
This commit is contained in:
parent
e58c7bb792
commit
ca19014af0
4 changed files with 15 additions and 0 deletions
|
|
@ -179,6 +179,7 @@ struct wlr_xwayland_shell_v1 *wlr_xwayland_shell_v1_create(
|
|||
|
||||
wl_list_init(&shell->surfaces);
|
||||
wl_signal_init(&shell->events.new_surface);
|
||||
wl_signal_init(&shell->events.destroy);
|
||||
|
||||
shell->display_destroy.notify = handle_display_destroy;
|
||||
wl_display_add_destroy_listener(display, &shell->display_destroy);
|
||||
|
|
@ -193,6 +194,8 @@ void wlr_xwayland_shell_v1_destroy(struct wlr_xwayland_shell_v1 *shell) {
|
|||
return;
|
||||
}
|
||||
|
||||
wl_signal_emit_mutable(&shell->events.destroy, NULL);
|
||||
|
||||
struct wlr_xwayland_surface_v1 *xwl_surface, *tmp;
|
||||
wl_list_for_each_safe(xwl_surface, tmp, &shell->surfaces, link) {
|
||||
xwl_surface_destroy(xwl_surface);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue