mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 01:48:00 +02:00
compositor: Fix a potential crash at shutdown
weston_global_destroy_save() can directly destroy a global if the compositor state is WESTON_COMPOSITOR_OFFSCREEN. Make sure we don't try to set_user_data after this has happened. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
81800294a9
commit
d9893c6af2
1 changed files with 3 additions and 4 deletions
|
|
@ -6528,11 +6528,10 @@ weston_head_remove_global(struct weston_head *head)
|
|||
{
|
||||
struct wl_resource *resource, *tmp;
|
||||
|
||||
if (head->global)
|
||||
if (head->global) {
|
||||
wl_global_set_user_data(head->global, NULL);
|
||||
weston_global_destroy_save(head->compositor, head->global);
|
||||
|
||||
wl_global_set_user_data(head->global, NULL);
|
||||
|
||||
}
|
||||
head->global = NULL;
|
||||
|
||||
wl_resource_for_each_safe(resource, tmp, &head->resource_list) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue