From 7d711a10aa5ce5a045901381e80d9b41f2be08b2 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 24 Jun 2021 20:30:25 +0200 Subject: [PATCH] vulkan/wsi/wayland: fix wsi_wl_image_init error code If image->buffer cannot be allocated, the value returned by wsi_create_native_image is returned. However, if we got that far, that value is VK_SUCCESS. Fix it and return VK_ERROR_OUT_OF_HOST_MEMORY. Signed-off-by: Simon Ser Acked-by: Lionel Landwerlin Part-of: --- src/vulkan/wsi/wsi_common_wayland.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index d5069ac7e5d..219c77692c4 100644 --- a/src/vulkan/wsi/wsi_common_wayland.c +++ b/src/vulkan/wsi/wsi_common_wayland.c @@ -1000,7 +1000,7 @@ wsi_wl_image_init(struct wsi_wl_swapchain *chain, fail_image: wsi_destroy_image(&chain->base, &image->base); - return result; + return VK_ERROR_OUT_OF_HOST_MEMORY; } static VkResult