backend-wayland: Avoid iterating over un-intialized lists
As an in-flight resize call might cause a call to wayland_output_destroy_shm_buffers() to go over a list of free_buffers list. Just initialize the lists before attempting to create the parent surface to avoid it. Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
parent
d8b861766c
commit
529fae91f7
|
@ -1239,6 +1239,9 @@ wayland_output_enable(struct weston_output *base)
|
|||
enum mode_status mode_status;
|
||||
int ret = 0;
|
||||
|
||||
wl_list_init(&output->shm.buffers);
|
||||
wl_list_init(&output->shm.free_buffers);
|
||||
|
||||
weston_log("Creating %dx%d wayland output at (%d, %d)\n",
|
||||
output->base.current_mode->width,
|
||||
output->base.current_mode->height,
|
||||
|
@ -1250,9 +1253,6 @@ wayland_output_enable(struct weston_output *base)
|
|||
if (ret < 0)
|
||||
return -1;
|
||||
|
||||
wl_list_init(&output->shm.buffers);
|
||||
wl_list_init(&output->shm.free_buffers);
|
||||
|
||||
if (b->use_pixman) {
|
||||
if (wayland_output_init_pixman_renderer(output) < 0)
|
||||
goto err_output;
|
||||
|
|
Loading…
Reference in New Issue