From: Dave Airlie Date: Tue, 15 Nov 2016 20:11:51 +0000 (+0000) Subject: radv: don't crash on null swapchain destroy. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=38ab625c5f5ca06b78af2892422a966dc659f8cd;p=mesa.git radv: don't crash on null swapchain destroy. Just return if the passed in swapchain is NULL. Fixes: dEQP-VK.wsi.xlib.swapchain.destroy.null_handle Cc: "13.0" Signed-off-by: Dave Airlie --- diff --git a/src/amd/vulkan/radv_wsi.c b/src/amd/vulkan/radv_wsi.c index a946bd4a8c5..1f1ab1c800b 100644 --- a/src/amd/vulkan/radv_wsi.c +++ b/src/amd/vulkan/radv_wsi.c @@ -288,6 +288,9 @@ void radv_DestroySwapchainKHR( RADV_FROM_HANDLE(wsi_swapchain, swapchain, _swapchain); const VkAllocationCallbacks *alloc; + if (!_swapchain) + return; + if (pAllocator) alloc = pAllocator; else