diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c index 3e77b1c1d0..b8d341efc2 100644 --- a/gdk/wayland/gdkwindow-wayland.c +++ b/gdk/wayland/gdkwindow-wayland.c @@ -831,7 +831,7 @@ xdg_surface_close (void *data, GdkEvent *event; event = gdk_event_new (GDK_DELETE); - event->any.window = window; + event->any.window = g_object_ref (window); event->any.send_event = TRUE; display = gdk_window_get_display (window);