diff options
-rw-r--r-- | src/vulkan/wsi/wsi_common_x11.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c index 25ba0c1b8ae..037aa50ba2a 100644 --- a/src/vulkan/wsi/wsi_common_x11.c +++ b/src/vulkan/wsi/wsi_common_x11.c @@ -349,6 +349,9 @@ x11_surface_get_capabilities(VkIcdSurfaceBase *icd_surface, xcb_visualtype_t *visual = get_visualtype_for_window(conn, window, &visual_depth); + if (!visual) + return VK_ERROR_SURFACE_LOST_KHR; + geom = xcb_get_geometry_reply(conn, geom_cookie, &err); if (geom) { VkExtent2D extent = { geom->width, geom->height }; |