1
0
Fork 0
forked from suyu/suyu

Merge pull request #9573 from liamwhite/optional

vulkan_device: avoid attempt to access empty optional
This commit is contained in:
Narr the Reg 2023-01-07 10:40:21 -06:00 committed by GitHub
commit cc92b7fd94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1520,8 +1520,12 @@ void Device::SetupFamilies(VkSurfaceKHR surface) {
LOG_ERROR(Render_Vulkan, "Device lacks a present queue"); LOG_ERROR(Render_Vulkan, "Device lacks a present queue");
throw vk::Exception(VK_ERROR_FEATURE_NOT_PRESENT); throw vk::Exception(VK_ERROR_FEATURE_NOT_PRESENT);
} }
graphics_family = *graphics; if (graphics) {
present_family = *present; graphics_family = *graphics;
}
if (present) {
present_family = *present;
}
} }
void Device::SetupFeatures() { void Device::SetupFeatures() {