summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-11-15 20:11:51 +0000
committerEmil Velikov <emil.l.velikov@gmail.com>2016-11-24 16:34:40 +0000
commit7bbe351e49618c35abb34a6b2512f248cd5fb80f (patch)
tree7f5f234038617187996dfed67f73961450324336 /src/amd/vulkan
parenta3f628ca25fc64022a27287f18e8c7fbe20c7e56 (diff)
downloadexternal_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.c3
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