wayland: properly empty output list

This commit is contained in:
Alexander Preisinger authored and wm4 committed 2014-01-15 20:51:39 +01:00
1 parent 54fd5d0979
commit 9fabf85a44
1 file changed
+4 -4
+4 -4
View File
@@ -658,17 +658,17 @@ static bool create_display (struct vo_wayland_state *wl)
static void destroy_display (struct vo_wayland_state *wl)
{
struct vo_wayland_output *output;
struct vo_wayland_output *output = NULL;
struct vo_wayland_output *tmp = NULL;
wl_list_for_each(output, &wl->display.output_list, link) {
wl_list_for_each_safe(output, tmp, &wl->display.output_list, link) {
if (output && output->output) {
wl_output_destroy(output->output);
output->output = NULL;
wl_list_remove(&output->link);
}
}
wl_list_empty(&wl->display.output_list);
if (wl->display.shm)
wl_shm_destroy(wl->display.shm);