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
dev
Ander Conselvan de Oliveira 11 years ago committed by Kristian Høgsberg
parent d4ea71eada
commit 24dff2b704
  1. 6
      src/compositor.c

@ -413,6 +413,12 @@ weston_view_output_destroy_handler(struct wl_listener *listener,
if (ev->surface->output_destroyed) if (ev->surface->output_destroyed)
ev->surface->output_destroyed(ev->surface); 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 * WL_EXPORT struct weston_view *

Loading…
Cancel
Save