vulkan: Allow destroying NULL debug report callbacks

Fixes: 086cfa5652 "anv: implementation of VK_EXT_debug_report extension"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4690>
This commit is contained in:
Jason Ekstrand
2020-04-21 11:29:21 -05:00
committed by Marge Bot
parent 46b3cb011f
commit 9d10bde5a8

View File

@@ -77,6 +77,9 @@ vk_destroy_debug_report_callback(struct vk_debug_report_instance *instance,
const VkAllocationCallbacks* pAllocator,
const VkAllocationCallbacks* instance_allocator)
{
if (_callback == VK_NULL_HANDLE)
return;
struct vk_debug_report_callback *callback =
(struct vk_debug_report_callback *)(uintptr_t)_callback;