diff options
author | Dave Airlie <[email protected]> | 2016-11-15 20:11:51 +0000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2016-11-16 09:18:03 +1000 |
commit | 38ab625c5f5ca06b78af2892422a966dc659f8cd (patch) | |
tree | 9442dd71bc123a047f7d717e020eca1b4c70df82 /src/amd | |
parent | 253fa25d09b77e18f736b97da07d57be0e6c4200 (diff) |
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" <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/vulkan/radv_wsi.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 |