aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2023-01-07 10:40:21 -0600
committerGitHub <noreply@github.com>2023-01-07 10:40:21 -0600
commit034e292657f1b1de468fdd0c08fd9ebd18dedca6 (patch)
treeaf5aef3120f848b70c039b6e9cf02a5f67ce76a8 /src
parent1fbeefd57332a936f8f30aa8252c64ace7c5609e (diff)
parentf82c3649c34002d412d91033cba40afb1b86da08 (diff)
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.cpp8
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 77aee802de..07c984c5e8 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) {
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() {