mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
vulkan/overlay: fix crash on destroying NULL swapchain
Cc: <mesa-stable@lists.freedesktop.org> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5616>
This commit is contained in:
parent
8c962f5f61
commit
ec7b55f4cc
1 changed files with 6 additions and 0 deletions
|
|
@ -1861,6 +1861,12 @@ static void overlay_DestroySwapchainKHR(
|
|||
VkSwapchainKHR swapchain,
|
||||
const VkAllocationCallbacks* pAllocator)
|
||||
{
|
||||
if (swapchain == VK_NULL_HANDLE) {
|
||||
struct device_data *device_data = FIND(struct device_data, device);
|
||||
device_data->vtable.DestroySwapchainKHR(device, swapchain, pAllocator);
|
||||
return;
|
||||
}
|
||||
|
||||
struct swapchain_data *swapchain_data =
|
||||
FIND(struct swapchain_data, swapchain);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue