Set ec->explicit_sync_surface to null when it destroyed 63/262363/4
authorJoonbum Ko <joonbum.ko@samsung.com>
Mon, 9 Aug 2021 05:52:27 +0000 (14:52 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Wed, 11 Aug 2021 01:32:06 +0000 (01:32 +0000)
 - 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 <joonbum.ko@samsung.com>
src/bin/e_explicit_sync.c

index 82bb402d853603ff2b181141278fc80934e7bb8b..2ffa4f5cde7d80ef7d169b6ba1fb7ea6910a7099 100644 (file)
@@ -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;
      }