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:
Jasper St. Pierre 2013-11-19 19:27:04 -05:00
parent 02144d17e9
commit 2ebecc5370

View File

@ -478,6 +478,10 @@ static void
destroy_surface_extension (struct wl_resource *resource)
{
MetaWaylandSurfaceExtension *extension = wl_resource_get_user_data (resource);
if (extension->resource == NULL)
return;
wl_list_remove (&extension->surface_destroy_listener.link);
extension->surface_destroy_listener.notify = NULL;
extension->resource = NULL;