anv: Avoid null ptr dereference
Avoids the sanitizer error: ``` ../src/intel/vulkan/anv_instance.c:266:37: runtime error: member access within null pointer of type 'struct anv_instance' ``` Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32098>
This commit is contained in:
@@ -263,7 +263,7 @@ PFN_vkVoidFunction anv_GetInstanceProcAddr(
|
||||
const char* pName)
|
||||
{
|
||||
ANV_FROM_HANDLE(anv_instance, instance, _instance);
|
||||
return vk_instance_get_proc_addr(&instance->vk,
|
||||
return vk_instance_get_proc_addr(instance ? &instance->vk : NULL,
|
||||
&anv_instance_entrypoints,
|
||||
pName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user