diff --git a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanInstance.cpp b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanInstance.cpp index 98ccb57e9..4812e0d55 100644 --- a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanInstance.cpp +++ b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanInstance.cpp @@ -707,8 +707,17 @@ VkPhysicalDevice VulkanInstance::SelectPhysicalDeviceForOpenXR(const CreateInfo: return vkDevice; #else +# ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable : 4702) // unreachable code +# endif + LOG_ERROR_AND_THROW("OpenXR is not supported. Use DILIGENT_USE_OPENXR CMake option to enable it."); return VK_NULL_HANDLE; + +# ifdef _MSC_VER +# pragma warning(pop) +# endif #endif }