From 9147849dc4eebe5146c3b275f65ee5379c24cc95 Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Mon, 9 Aug 2021 14:52:27 +0900 Subject: [PATCH] Set ec->explicit_sync_surface to null when it destroyed - If client try to create only explicit_surface_sync after destroying its old one while ec is retained, the creation will be failed because ec->explicit_surface_sync was not initialized to NULL. - This problem cannot occur in normal EGL client, but can occur in Vulkan. Change-Id: Ifa5e0340c5a6f91ec66fd24c5c5f3a3fce3f1c42 Signed-off-by: Joonbum Ko --- src/bin/e_explicit_sync.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/e_explicit_sync.c b/src/bin/e_explicit_sync.c index 82bb402..2ffa4f5 100644 --- a/src/bin/e_explicit_sync.c +++ b/src/bin/e_explicit_sync.c @@ -286,6 +286,7 @@ _e_explicit_sync_surface_cb_resource_destroy(struct wl_resource *resource) if (explicit_sync_surface->ec) { e_object_delfn_del(E_OBJECT(explicit_sync_surface->ec), explicit_sync_surface->ec_delfn); + explicit_sync_surface->ec->explicit_sync_surface = NULL; explicit_sync_surface->ec_delfn = NULL; explicit_sync_surface->ec = NULL; } -- 2.7.4