diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vulkan/wsi/wsi_common_wayland.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index 32a0a51349d..fc13bde4005 100644 --- a/src/vulkan/wsi/wsi_common_wayland.c +++ b/src/vulkan/wsi/wsi_common_wayland.c @@ -635,11 +635,15 @@ wsi_wl_image_init(struct wsi_wl_swapchain *chain, wl_display_roundtrip(chain->display->display); close(fd); + if (!image->buffer) + goto fail_image; + wl_proxy_set_queue((struct wl_proxy *)image->buffer, chain->queue); wl_buffer_add_listener(image->buffer, &buffer_listener, image); return VK_SUCCESS; +fail_image: chain->base.image_fns->free_wsi_image(vk_device, pAllocator, image->image, image->memory); |