diff --git a/src/core/window.c b/src/core/window.c index 36aa9e4be..d09e8d6e3 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -1215,7 +1215,10 @@ meta_window_unmanage (MetaWindow *window, /* This needs to happen for both Wayland and XWayland clients, * so it can't be in MetaWindowWayland. */ if (window->surface) - meta_wayland_surface_set_window (window->surface, NULL); + { + meta_wayland_surface_set_window (window->surface, NULL); + window->surface = NULL; + } if (window->visible_to_compositor) {