wayland-surface: Allow extension resources to be double-destroyed
As they will be on shutdown... I'm not sure if this is a wayland-server bug or not, but we should guard against it anyway.
This commit is contained in:
parent
02144d17e9
commit
2ebecc5370
@ -478,6 +478,10 @@ static void
|
|||||||
destroy_surface_extension (struct wl_resource *resource)
|
destroy_surface_extension (struct wl_resource *resource)
|
||||||
{
|
{
|
||||||
MetaWaylandSurfaceExtension *extension = wl_resource_get_user_data (resource);
|
MetaWaylandSurfaceExtension *extension = wl_resource_get_user_data (resource);
|
||||||
|
|
||||||
|
if (extension->resource == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
wl_list_remove (&extension->surface_destroy_listener.link);
|
wl_list_remove (&extension->surface_destroy_listener.link);
|
||||||
extension->surface_destroy_listener.notify = NULL;
|
extension->surface_destroy_listener.notify = NULL;
|
||||||
extension->resource = NULL;
|
extension->resource = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user