vulkan/wsi/display: check if wsi_swapchain_init() succeeded
Fixes: da997ebec9 "vulkan: Add KHR_display extension using DRM [v10]"
Cc: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
@@ -1712,6 +1712,10 @@ wsi_display_surface_create_swapchain(
|
||||
|
||||
VkResult result = wsi_swapchain_init(wsi_device, &chain->base, device,
|
||||
create_info, allocator);
|
||||
if (result != VK_SUCCESS) {
|
||||
vk_free(allocator, chain);
|
||||
return result;
|
||||
}
|
||||
|
||||
chain->base.destroy = wsi_display_swapchain_destroy;
|
||||
chain->base.get_wsi_image = wsi_display_get_wsi_image;
|
||||
|
||||
Reference in New Issue
Block a user