From: Joonbum Ko Date: Fri, 12 Apr 2024 04:13:51 +0000 (+0900) Subject: wl_egl: add exception checking to find invalid wl_egl_buffer X-Git-Tag: accepted/tizen/8.0/unified/20240415.141904~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=250afc989e1197fa462c704437d391877b6243eb;p=platform%2Fcore%2Fuifw%2Flibtpl-egl.git wl_egl: add exception checking to find invalid wl_egl_buffer Change-Id: If5d66523e1d190d2c341f81ff01edf3411c2f3b5 Signed-off-by: Joonbum Ko --- diff --git a/src/tpl_wl_egl_thread.c b/src/tpl_wl_egl_thread.c index 11d7dda..df9a733 100755 --- a/src/tpl_wl_egl_thread.c +++ b/src/tpl_wl_egl_thread.c @@ -3529,6 +3529,12 @@ _thread_wl_surface_commit(tpl_wl_egl_surface_t *wl_egl_surface, TPL_CHECK_ON_FALSE_ASSERT_FAIL(wl_egl_buffer != NULL, "wl_egl_buffer sould be not NULL"); + if (__tpl_list_get_count(wl_egl_surface->buffers) == 0) { + TPL_ERR("wl_egl_buffer(%p) already has been removed from wl_egl_surface(%p)", + wl_egl_buffer, wl_egl_surface); + return; + } + if (wl_egl_buffer->wl_buffer == NULL) { wl_egl_buffer->wl_buffer = (struct wl_proxy *)wayland_tbm_client_create_buffer(