diff options
| author | 2019-04-10 12:29:15 -0400 | |
|---|---|---|
| committer | 2019-09-21 16:43:10 -0400 | |
| commit | 62d772eaedbdd983574d2bfd0022fff58b55ca73 (patch) | |
| tree | 95371b70e637a36a961e460bf79a5bf82bc84998 /src | |
| parent | patch_manager: Add error checking to load dir to prevent crashes (diff) | |
| download | yuzu-62d772eaedbdd983574d2bfd0022fff58b55ca73.tar.gz yuzu-62d772eaedbdd983574d2bfd0022fff58b55ca73.tar.xz yuzu-62d772eaedbdd983574d2bfd0022fff58b55ca73.zip | |
patch_manager: Add short-circuit edge-case to GetPatchVersionNames
If title ID is 0, there are no add ons, prevents wasting time looking for them.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/file_sys/patch_manager.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/file_sys/patch_manager.cpp b/src/core/file_sys/patch_manager.cpp index 0a4f0ea74..e3ebaca03 100644 --- a/src/core/file_sys/patch_manager.cpp +++ b/src/core/file_sys/patch_manager.cpp | |||
| @@ -408,6 +408,8 @@ static bool IsDirValidAndNonEmpty(const VirtualDir& dir) { | |||
| 408 | 408 | ||
| 409 | std::map<std::string, std::string, std::less<>> PatchManager::GetPatchVersionNames( | 409 | std::map<std::string, std::string, std::less<>> PatchManager::GetPatchVersionNames( |
| 410 | VirtualFile update_raw) const { | 410 | VirtualFile update_raw) const { |
| 411 | if (title_id == 0) | ||
| 412 | return {}; | ||
| 411 | std::map<std::string, std::string, std::less<>> out; | 413 | std::map<std::string, std::string, std::less<>> out; |
| 412 | const auto& installed = Core::System::GetInstance().GetContentProvider(); | 414 | const auto& installed = Core::System::GetInstance().GetContentProvider(); |
| 413 | const auto& disabled = Settings::values.disabled_addons[title_id]; | 415 | const auto& disabled = Settings::values.disabled_addons[title_id]; |