From 82e2ce63900cd86154f32bf11e0365a886ccc31d Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Fri, 13 May 2022 22:48:44 +0100 Subject: [PATCH] st/oxr: Fix crash when there is no optional extension in the list --- src/xrt/state_trackers/oxr/oxr_vulkan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xrt/state_trackers/oxr/oxr_vulkan.c b/src/xrt/state_trackers/oxr/oxr_vulkan.c index 3dc11a3aa..e90e987dc 100644 --- a/src/xrt/state_trackers/oxr/oxr_vulkan.c +++ b/src/xrt/state_trackers/oxr/oxr_vulkan.c @@ -332,7 +332,8 @@ oxr_vk_create_vulkan_device(struct oxr_logger *log, #endif for (uint32_t i = 0; i < ARRAY_SIZE(optional_device_extensions); i++) { - if (optional_device_extensions[i] && + // Empty list or a not supported extension. + if (optional_device_extensions[i] == NULL || !vk_check_extension(props, prop_count, optional_device_extensions[i])) { continue; }