Skip to content

Commit

Permalink
XCB surface: Don't crash on wayland proper
Browse files Browse the repository at this point in the history
When running the X11 caps viewer on wayland, QX11Info::connection is null
  • Loading branch information
HildarTheDorf committed Nov 21, 2024
1 parent 9b7bfaa commit 4191d77
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file added vulkanCapsViewer
Binary file not shown.
2 changes: 1 addition & 1 deletion vulkancapsviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ bool VulkanCapsViewer::initVulkan()
#endif

#if defined(VK_USE_PLATFORM_XCB_KHR)
if (surface_extension == VK_KHR_XCB_SURFACE_EXTENSION_NAME) {
if (surface_extension == VK_KHR_XCB_SURFACE_EXTENSION_NAME && QX11Info::isPlatformX11()) {
VkXcbSurfaceCreateInfoKHR surfaceCreateInfo = {};
surfaceCreateInfo.sType = VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR;
surfaceCreateInfo.connection = QX11Info::connection();
Expand Down

0 comments on commit 4191d77

Please sign in to comment.