vulkan/log: Allow but warn if called with a NULL object
authorJason Ekstrand <jason.ekstrand@collabora.com>
Fri, 22 Apr 2022 17:46:02 +0000 (12:46 -0500)
committerMarge Bot <emma+marge@anholt.net>
Tue, 26 Apr 2022 16:22:23 +0000 (16:22 +0000)
commit62a44d1bda958e6f8f56fd958023de9be7347a08
tree3bfcbf2408acbbbf9486f6fa4311f8f66bbf2ea4
parentef9d97ec1f9d9834db3066b5a7ec67ce6d4ecd86
vulkan/log: Allow but warn if called with a NULL object

Most of the time when the logging code is invoked, it means we're
already in an edge case.  It should be as robust as possible, otherwise
we risk making hard to debug things even harder.  To that end, instead
of blowing up if passed a NULL object on the list, handle it as
gracefully as we can.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16107>
src/vulkan/runtime/vk_log.c