diff options
author | Jason Ekstrand <[email protected]> | 2020-04-21 11:29:21 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-04 14:06:27 +0000 |
commit | 9d10bde5a878aac440ea34dfb304812cd00b231c (patch) | |
tree | c56f053a12c34bcd183afabac0c4e430d8eff805 /src | |
parent | 46b3cb011fd1c9198aeec33d453206846b579817 (diff) |
vulkan: Allow destroying NULL debug report callbacks
Fixes: 086cfa5652 "anv: implementation of VK_EXT_debug_report extension"
Reviewed-by: Lionel Landwerlin <[email protected]>
Acked-by: Kristian H. Kristensen <[email protected]>
Acked-by: Bas Nieuwenhuizen <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4690>
Diffstat (limited to 'src')
-rw-r--r-- | src/vulkan/util/vk_debug_report.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vulkan/util/vk_debug_report.c b/src/vulkan/util/vk_debug_report.c index c4884b963e0..78dcfa6e218 100644 --- a/src/vulkan/util/vk_debug_report.c +++ b/src/vulkan/util/vk_debug_report.c @@ -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; |