summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>2013-12-19 18:34:28 +0200
committerKristian Høgsberg <krh@bitplanet.net>2013-12-19 21:52:09 -0800
commit24dff2b704a1cbf70b2785561934b83486c7f8fb (patch)
tree700f040fe3c7da26c6e512da99c5f38fdfaf9927
parentd4ea71eada760c049cb92af05ebe47c1c81162d0 (diff)
compositor: Clean up view output move and destroy listeners
Remove those listeners when the output is destroyed, otherwise they'll point to invalid data that may lead to corruption when assigning a new output for the view. -- This is possibly related to bug 72845. I didn't have enough equipment to try and reproduce it. https://bugs.freedesktop.org/show_bug.cgi?id=72845
-rw-r--r--src/compositor.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compositor.c b/src/compositor.c
index 6ca297ad..ff0f3ab5 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -413,6 +413,12 @@ weston_view_output_destroy_handler(struct wl_listener *listener,
if (ev->surface->output_destroyed)
ev->surface->output_destroyed(ev->surface);
+
+ wl_list_remove(&ev->output_move_listener.link);
+ wl_list_remove(&ev->output_destroy_listener.link);
+
+ wl_list_init(&ev->output_move_listener.link);
+ wl_list_init(&ev->output_destroy_listener.link);
}
WL_EXPORT struct weston_view *