compositor: use wl_list_for_each_safe when destroying output

Was causing an invalid read when the output is in fact destroyed. That's only
visible (segfault on my machine) on drm compositor because it's the only
backend trying to finish correct the compositor.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
dev
Tiago Vignatti 13 years ago
parent 7bb92f0c03
commit b303a1d3fc
  1. 4
      compositor/compositor.c

@ -1932,10 +1932,10 @@ wlsc_compositor_init(struct wlsc_compositor *ec, struct wl_display *display)
WL_EXPORT void
wlsc_compositor_shutdown(struct wlsc_compositor *ec)
{
struct wlsc_output *output;
struct wlsc_output *output, *next;
/* Destroy all outputs associated with this compositor */
wl_list_for_each(output, &ec->output_list, link)
wl_list_for_each_safe(output, next, &ec->output_list, link)
output->destroy(output);
}

Loading…
Cancel
Save