mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-15 22:54:00 +00:00
vulkan_device: avoid attempt to access empty optional
This commit is contained in:
parent
c0f17e1b27
commit
444b25bae1
1 changed files with 6 additions and 2 deletions
|
@ -1520,8 +1520,12 @@ void Device::SetupFamilies(VkSurfaceKHR surface) {
|
|||
LOG_ERROR(Render_Vulkan, "Device lacks a present queue");
|
||||
throw vk::Exception(VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
graphics_family = *graphics;
|
||||
present_family = *present;
|
||||
if (graphics) {
|
||||
graphics_family = *graphics;
|
||||
}
|
||||
if (present) {
|
||||
present_family = *present;
|
||||
}
|
||||
}
|
||||
|
||||
void Device::SetupFeatures() {
|
||||
|
|
Loading…
Reference in a new issue