From 38ab625c5f5ca06b78af2892422a966dc659f8cd Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 15 Nov 2016 20:11:51 +0000 Subject: [PATCH] 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 --- src/amd/vulkan/radv_wsi.c | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.30.2