summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-04-27 15:29:35 -0400
committerChristopher James Halse Rogers <christopher.halse.rogers@canonical.com>2012-06-13 15:26:20 +1000
commit6dd00a7b4d0cf35fb4b31c100304352da9670ea8 (patch)
tree028b6a5768d8fd6eeee14f3fe683d2baa70e1128
parent4567ed07d9e244e3ef7813805b0d8e47eec05c7f (diff)
xwayland: Only remove xwl_window from damage list if it's on it
We determine whether or not it's on the list using DamageEmpty(). Spotted by Tomasz Borowik <timon37@lavabit.com>.
-rw-r--r--hw/xfree86/xwayland/xwayland-window.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xfree86/xwayland/xwayland-window.c b/hw/xfree86/xwayland/xwayland-window.c
index e58350feb..07a5c7c3e 100644
--- a/hw/xfree86/xwayland/xwayland-window.c
+++ b/hw/xfree86/xwayland/xwayland-window.c
@@ -248,7 +248,8 @@ xwl_unrealize_window(WindowPtr window)
wl_buffer_destroy(xwl_window->buffer);
wl_surface_destroy(xwl_window->surface);
xorg_list_del(&xwl_window->link);
- xorg_list_del(&xwl_window->link_damage);
+ if (RegionNotEmpty(DamageRegion(xwl_window->damage)))
+ xorg_list_del(&xwl_window->link_damage);
DamageUnregister(&window->drawable, xwl_window->damage);
DamageDestroy(xwl_window->damage);
free(xwl_window);