diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-01-29 04:28:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-29 04:28:38 +0100 |
commit | 236f591bde7450d5f78df282a8d23ed19c3a14c9 (patch) | |
tree | 7d1c893d1da3e5efd87186b740441be42100462b | |
parent | Merge pull request #9687 from ameerj/ogl-shader-ms (diff) | |
parent | yuzu: config: Avoid reading deleted object (diff) | |
download | yuzu-236f591bde7450d5f78df282a8d23ed19c3a14c9.tar yuzu-236f591bde7450d5f78df282a8d23ed19c3a14c9.tar.gz yuzu-236f591bde7450d5f78df282a8d23ed19c3a14c9.tar.bz2 yuzu-236f591bde7450d5f78df282a8d23ed19c3a14c9.tar.lz yuzu-236f591bde7450d5f78df282a8d23ed19c3a14c9.tar.xz yuzu-236f591bde7450d5f78df282a8d23ed19c3a14c9.tar.zst yuzu-236f591bde7450d5f78df282a8d23ed19c3a14c9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/yuzu/configuration/input_profiles.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/yuzu/configuration/input_profiles.cpp b/src/yuzu/configuration/input_profiles.cpp index 9bb69cab1..41ef4250a 100644 --- a/src/yuzu/configuration/input_profiles.cpp +++ b/src/yuzu/configuration/input_profiles.cpp @@ -58,13 +58,16 @@ std::vector<std::string> InputProfiles::GetInputProfileNames() { std::vector<std::string> profile_names; profile_names.reserve(map_profiles.size()); - for (const auto& [profile_name, config] : map_profiles) { + auto it = map_profiles.cbegin(); + while (it != map_profiles.cend()) { + const auto& [profile_name, config] = *it; if (!ProfileExistsInFilesystem(profile_name)) { - DeleteProfile(profile_name); + it = map_profiles.erase(it); continue; } profile_names.push_back(profile_name); + ++it; } std::stable_sort(profile_names.begin(), profile_names.end()); |