mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-10-03 03:31:59 +00:00
compositor-wayland: Destroy cursor images earlier
Destroying a wl_cursor will attempt to access the wl_display, which we have just freed. Avoid a segfault by destroying the cursor images before we destroy the display. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dima Ryazanov <dima@gmail.com>
This commit is contained in:
parent
7dbb0e148f
commit
698f9bf854
|
@ -2372,10 +2372,6 @@ wayland_destroy(struct weston_compositor *ec)
|
|||
if (b->parent.compositor)
|
||||
wl_compositor_destroy(b->parent.compositor);
|
||||
|
||||
wl_registry_destroy(b->parent.registry);
|
||||
wl_display_flush(b->parent.wl_display);
|
||||
wl_display_disconnect(b->parent.wl_display);
|
||||
|
||||
if (b->theme)
|
||||
theme_destroy(b->theme);
|
||||
|
||||
|
@ -2384,6 +2380,10 @@ wayland_destroy(struct weston_compositor *ec)
|
|||
|
||||
wl_cursor_theme_destroy(b->cursor_theme);
|
||||
|
||||
wl_registry_destroy(b->parent.registry);
|
||||
wl_display_flush(b->parent.wl_display);
|
||||
wl_display_disconnect(b->parent.wl_display);
|
||||
|
||||
free(b);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue