[mutter/wayland] wayland-surface: Allow extension resources to be double-destroyed
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] wayland-surface: Allow extension resources to be double-destroyed
- Date: Wed, 20 Nov 2013 00:36:07 +0000 (UTC)
commit 2ebecc5370eb61668feff2fd8742891ca40f30fc
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Nov 19 19:27:04 2013 -0500
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.
src/wayland/meta-wayland-surface.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 317f4fb..ebcd964 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]