Better handle missing settings file
authorTony-LunarG <tony@lunarg.com>
Mon, 12 Jun 2023 16:59:47 +0000 (10:59 -0600)
committerTony Barbour <tony@lunarg.com>
Mon, 12 Jun 2023 20:24:40 +0000 (14:24 -0600)
loader/loader_windows.c

index 8c1d67fa48e75ae877d64acd06372bd626e4ad41..21494a0d329f2629ce4890c0bb97a595826cdefa 100644 (file)
@@ -1130,6 +1130,7 @@ VkResult windows_get_loader_settings_file_path(const struct loader_instance *ins
     if (is_high_integrity()) {
         LONG rtn_value = RegOpenKeyEx(HKEY_LOCAL_MACHINE, VK_SETTINGS_INFO_REGISTRY_LOC, 0, access_flags, &key);
         if (ERROR_SUCCESS != rtn_value) {
+            result = VK_ERROR_FEATURE_NOT_PRESENT;
             goto out;
         }
         result = get_settings_path_if_exists_in_registry_key(inst, out_path, key);
@@ -1146,6 +1147,7 @@ VkResult windows_get_loader_settings_file_path(const struct loader_instance *ins
 
         rtn_value = RegOpenKeyEx(HKEY_LOCAL_MACHINE, VK_SETTINGS_INFO_REGISTRY_LOC, 0, access_flags, &key);
         if (ERROR_SUCCESS != rtn_value) {
+            result = VK_ERROR_FEATURE_NOT_PRESENT;
             goto out;
         }