mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 05:40:13 +01:00
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:
parent
3e7b5e5db2
commit
bde3102c0d
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue