mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-11 05:50:14 +01:00
pvr: fix GetInstanceProcAddr ubsan warning when _instance == NULL
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com> Acked-by: Frank Binns <frank.binns@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
This commit is contained in:
parent
8f1613accf
commit
cbc9896264
1 changed files with 8 additions and 2 deletions
|
|
@ -1283,8 +1283,14 @@ void pvr_GetPhysicalDeviceMemoryProperties2(
|
|||
PFN_vkVoidFunction pvr_GetInstanceProcAddr(VkInstance _instance,
|
||||
const char *pName)
|
||||
{
|
||||
PVR_FROM_HANDLE(pvr_instance, instance, _instance);
|
||||
return vk_instance_get_proc_addr(&instance->vk,
|
||||
const struct vk_instance *vk_instance = NULL;
|
||||
|
||||
if (_instance != NULL) {
|
||||
PVR_FROM_HANDLE(pvr_instance, instance, _instance);
|
||||
vk_instance = &instance->vk;
|
||||
}
|
||||
|
||||
return vk_instance_get_proc_addr(vk_instance,
|
||||
&pvr_instance_entrypoints,
|
||||
pName);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue