mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-17 04:50:19 +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> (cherry picked from commitbde3102c0d)
This commit is contained in:
parent
74bb9aeae9
commit
18913d2aae
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