anv: avoid segmentation fault due to vk_error()
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Fri, 19 Jan 2018 07:45:10 +0000 (08:45 +0100)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Fri, 19 Jan 2018 08:39:05 +0000 (09:39 +0100)
commit7109a1fe132e5f79a25bb34f0f28a21cce3076db
tree084d4c563945c21ad1c49139653202680d17c77c
parent32170d87e3b7bee37234b44ff787ff60fcd3a9aa
anv: avoid segmentation fault due to vk_error()

vk_error() is a macro that calls __vk_errorf() with instance == NULL.

Then, __vk_errorf() passes a pointer to instance->debug_report_callbacks
to vk_debug_error(), which segfaults as this pointer is invalid but not
NULL.

Fixes: e5b1bd6ab8 "vulkan: move anv VK_EXT_debug_report implementation to common code."

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/intel/vulkan/anv_util.c