NULL pointer dereference in Vulkan ICD when using non-local X server


forwarding this from Debian Bug #1003116:

I’m sometimes using my workstation remotely, so the DISPLAY environment variable points to an SSH connection, and the local GPU cannot be used to present even if it is accessible to the current user.

For this reason, my test program interrogates the enumerated physical devices whether they are able to present to the surface that refers to the remote connection. Calling vkGetPhysicalDeviceSurfaceCapabilitiesKHR however gives a segmentation fault trying to jump to a NULL pointer:

==30443== Jump to the invalid address stated on the next line
==30443==    at 0x0: ???
==30443==    by 0x123B284E: ??? (in /usr/lib/x86_64-linux-gnu/
==30443==    by 0x123A601B: ??? (in /usr/lib/x86_64-linux-gnu/
==30443==    by 0x123B2D82: ??? (in /usr/lib/x86_64-linux-gnu/
==30443==    by 0x1457033D: vulkan_layer_chassis::GetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice_T*, VkSurfaceKHR_T*, VkSurfaceCapabilitiesKHR*) (chassis.cpp:4703)
==30443==    by 0x1098C0: vulkan_setup (vulkan_setup.c:211)
==30443==    by 0x109319: main (vkload.c:27)
==30443==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

Is there anything I can do to safely detect the case where the surface I have is not connected to the GPU I’m looking at?