From 81cadc725cbfeef2cd60574cf6859be595965873 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 3 Sep 2013 16:15:42 -0700 Subject: [PATCH] xwm: Set window->surface to NULL when surface goes away Otherwise we may end up trying to remove the destroy listener if we get the surface_destroy callback before the unmap_notify. --- src/xwayland/window-manager.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c index 5258197..c6c7bd5 100644 --- a/src/xwayland/window-manager.c +++ b/src/xwayland/window-manager.c @@ -1847,6 +1847,8 @@ surface_destroy(struct wl_listener *listener, void *data) struct weston_wm_window, surface_destroy_listener); wm_log("surface for xid %d destroyed\n", window->id); + + window->surface = NULL; } static struct weston_wm_window * -- 2.7.4