diff options
| author | 2023-01-07 10:40:21 -0600 | |
|---|---|---|
| committer | 2023-01-07 10:40:21 -0600 | |
| commit | cc92b7fd94a1a86da4a765eaa0756642907d95dc (patch) | |
| tree | af5aef3120f848b70c039b6e9cf02a5f67ce76a8 /src | |
| parent | Merge pull request #9567 from german77/antialias (diff) | |
| parent | vulkan_device: avoid attempt to access empty optional (diff) | |
| download | yuzu-cc92b7fd94a1a86da4a765eaa0756642907d95dc.tar.gz yuzu-cc92b7fd94a1a86da4a765eaa0756642907d95dc.tar.xz yuzu-cc92b7fd94a1a86da4a765eaa0756642907d95dc.zip | |
Merge pull request #9573 from liamwhite/optional
vulkan_device: avoid attempt to access empty optional
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 77aee802d..07c984c5e 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp | |||
| @@ -1520,8 +1520,12 @@ void Device::SetupFamilies(VkSurfaceKHR surface) { | |||
| 1520 | LOG_ERROR(Render_Vulkan, "Device lacks a present queue"); | 1520 | LOG_ERROR(Render_Vulkan, "Device lacks a present queue"); |
| 1521 | throw vk::Exception(VK_ERROR_FEATURE_NOT_PRESENT); | 1521 | throw vk::Exception(VK_ERROR_FEATURE_NOT_PRESENT); |
| 1522 | } | 1522 | } |
| 1523 | graphics_family = *graphics; | 1523 | if (graphics) { |
| 1524 | present_family = *present; | 1524 | graphics_family = *graphics; |
| 1525 | } | ||
| 1526 | if (present) { | ||
| 1527 | present_family = *present; | ||
| 1528 | } | ||
| 1525 | } | 1529 | } |
| 1526 | 1530 | ||
| 1527 | void Device::SetupFeatures() { | 1531 | void Device::SetupFeatures() { |