mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-04-14 11:10:58 +02:00
xwayland: fix segfault when running x11perf
Running "x11perf -reps 1 -repeat 1 -all" will segfault, due to
windows being left on lists after being destroyed.
The fix was devised after running Weston under valgrind whilst
x11perf was running.
Fixes: https://gitlab.freedesktop.org/wayland/weston/-/issues/797
Signed-off-by: Brendan King <Brendan.King@imgtec.com>
(cherry picked from commit 751c1c9496)
This commit is contained in:
parent
5e105153b1
commit
7fa9c19a99
1 changed files with 2 additions and 2 deletions
|
|
@ -951,6 +951,7 @@ weston_wm_create_surface(struct wl_listener *listener, void *data)
|
|||
xserver_map_shell_surface(window, surface);
|
||||
window->surface_id = 0;
|
||||
wl_list_remove(&window->link);
|
||||
wl_list_init(&window->link);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1672,8 +1673,7 @@ weston_wm_window_destroy(struct weston_wm_window *window)
|
|||
if (window->frame)
|
||||
frame_destroy(window->frame);
|
||||
|
||||
if (window->surface_id)
|
||||
wl_list_remove(&window->link);
|
||||
wl_list_remove(&window->link);
|
||||
|
||||
if (window->surface)
|
||||
wl_list_remove(&window->surface_destroy_listener.link);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue