mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 04:10:10 +01:00
v3dv: do not access member of a NULL structure
Check if the structure is NULL before trying to get access to its members. This has been detected by the Undefined Behaviour Sanitizer (UBSan). Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29911>
This commit is contained in:
parent
7dc6b8df11
commit
1d71be8e60
1 changed files with 1 additions and 1 deletions
|
|
@ -1655,7 +1655,7 @@ v3dv_GetInstanceProcAddr(VkInstance _instance,
|
|||
const char *pName)
|
||||
{
|
||||
V3DV_FROM_HANDLE(v3dv_instance, instance, _instance);
|
||||
return vk_instance_get_proc_addr(&instance->vk,
|
||||
return vk_instance_get_proc_addr(instance ? &instance->vk : NULL,
|
||||
&v3dv_instance_entrypoints,
|
||||
pName);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue