lvp: avoid accessing member of NULL ptr for global entries
authorYiwei Zhang <zzyiwei@chromium.org>
Fri, 12 May 2023 07:47:54 +0000 (00:47 -0700)
committerMarge Bot <emma+marge@anholt.net>
Fri, 12 May 2023 19:05:23 +0000 (19:05 +0000)
Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22979>

src/gallium/frontends/lavapipe/lvp_device.c

index ed832d5..60d667d 100644 (file)
@@ -1472,8 +1472,8 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL lvp_GetInstanceProcAddr(
    VkInstance                                  _instance,
    const char*                                 pName)
 {
-   LVP_FROM_HANDLE(lvp_instance, instance, _instance);
-   return vk_instance_get_proc_addr(&instance->vk,
+   VK_FROM_HANDLE(vk_instance, instance, _instance);
+   return vk_instance_get_proc_addr(instance,
                                     &lvp_instance_entrypoints,
                                     pName);
 }