From 899e7a3170b1bb8e1aa76d356e28aaa3866062ee Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Wed, 22 Dec 2021 17:16:12 +0900 Subject: [PATCH] Remove wl_egl_buffer from vblank list when it freed. - If the wl_egl_buffer is forcibly free from the buffer_clear(), the invalid wl_egl_buffer remains in vblank->waiting_buffers. - This invalid pointer should be removed from the list when wl_egl_buffer free. Change-Id: If6b9f58f4160c4426f2b816a22afb9e23b61372a Signed-off-by: Joonbum Ko --- src/tpl_wl_egl_thread.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tpl_wl_egl_thread.c b/src/tpl_wl_egl_thread.c index 81f8253..257de88 100755 --- a/src/tpl_wl_egl_thread.c +++ b/src/tpl_wl_egl_thread.c @@ -3485,6 +3485,13 @@ __cb_wl_egl_buffer_free(tpl_wl_egl_buffer_t *wl_egl_buffer) } tpl_gmutex_unlock(&wl_egl_surface->buffers_mutex); + tpl_gmutex_lock(&wl_egl_surface->surf_mutex); + __tpl_list_remove_data(wl_egl_surface->vblank->waiting_buffers, + (void *)wl_egl_buffer, + TPL_FIRST, + NULL); + tpl_gmutex_unlock(&wl_egl_surface->surf_mutex); + if (wl_egl_display) { if (wl_egl_buffer->wl_buffer) { wayland_tbm_client_destroy_buffer(wl_egl_display->wl_tbm_client, -- 2.7.4