Fix to prevent thread conflict. 38/258138/1
authorJoonbum Ko <joonbum.ko@samsung.com>
Tue, 11 May 2021 06:08:19 +0000 (15:08 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Tue, 11 May 2021 06:08:31 +0000 (15:08 +0900)
Change-Id: I946bd6bce80a3e6188ff9e6c060abb7634a7e9b0
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
src/tpl_wl_egl_thread.c

index 1f2a63e..7913614 100755 (executable)
@@ -1959,7 +1959,9 @@ __tpl_wl_egl_surface_fini(tpl_surface_t *surface)
                         wl_egl_surface,
                         wl_egl_surface->wl_surface, wl_egl_surface->tbm_queue);
 
+       tpl_gmutex_lock(&wl_egl_surface->surf_mutex);
        _tpl_wl_egl_surface_buffer_clear(wl_egl_surface);
+       tpl_gmutex_unlock(&wl_egl_surface->surf_mutex);
 
        if (wl_egl_surface->surf_source)
                tpl_gsource_destroy(wl_egl_surface->surf_source, TPL_TRUE);