diff options
author | Dave Airlie <airlied@redhat.com> | 2016-11-15 20:11:51 +0000 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2016-11-24 16:34:40 +0000 |
commit | 7bbe351e49618c35abb34a6b2512f248cd5fb80f (patch) | |
tree | 7f5f234038617187996dfed67f73961450324336 /src/amd/vulkan | |
parent | a3f628ca25fc64022a27287f18e8c7fbe20c7e56 (diff) | |
download | external_mesa3d-7bbe351e49618c35abb34a6b2512f248cd5fb80f.zip external_mesa3d-7bbe351e49618c35abb34a6b2512f248cd5fb80f.tar.gz external_mesa3d-7bbe351e49618c35abb34a6b2512f248cd5fb80f.tar.bz2 |
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" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 38ab625c5f5ca06b78af2892422a966dc659f8cd)
Diffstat (limited to 'src/amd/vulkan')
-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 a946bd4..1f1ab1c 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 |