Fix so that wl_buffer is not added to the listener with null. 16/258116/1
authorJoonbum Ko <joonbum.ko@samsung.com>
Tue, 11 May 2021 02:05:26 +0000 (11:05 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Tue, 11 May 2021 02:05:26 +0000 (11:05 +0900)
Change-Id: I346a97a4dcb3dfe11413919efacac1c904cfc096
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
src/tpl_wl_vk_thread.c

index 735c808..20baea3 100644 (file)
@@ -2145,16 +2145,16 @@ _thread_surface_queue_acquire(tpl_wl_vk_surface_t *wl_vk_surface)
                                TPL_WARN("Failed to create wl_buffer. wl_tbm_client(%p) tbm_surface(%p)",
                                                 wl_vk_display->wl_tbm_client, tbm_surface);
                        } else {
+                               if (wl_vk_buffer->acquire_fence_fd == -1 ||
+                                       wl_vk_display->use_explicit_sync == TPL_FALSE) {
+                                       wl_buffer_add_listener(wl_vk_buffer->wl_buffer,
+                                                                                  &wl_buffer_release_listener, wl_vk_buffer);
+                               }
+
                                TPL_LOG_T("WL_VK",
                                                  "[WL_BUFFER_CREATE] wl_vk_buffer(%p) wl_buffer(%p) tbm_surface(%p)",
                                                  wl_vk_buffer, wl_vk_buffer->wl_buffer, tbm_surface);
                        }
-
-                       if (wl_vk_buffer->acquire_fence_fd == -1 ||
-                               wl_vk_display->use_explicit_sync == TPL_FALSE) {
-                               wl_buffer_add_listener(wl_vk_buffer->wl_buffer,
-                                                                          &wl_buffer_release_listener, wl_vk_buffer);
-                       }
                }
 
                if (!wl_vk_display->use_wait_vblank || wl_vk_surface->vblank_done)