summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-04-10 12:29:15 -0400
committerZach Hilman <zachhilman@gmail.com>2019-09-21 16:43:10 -0400
commit62d772eaedbdd983574d2bfd0022fff58b55ca73 (patch)
tree95371b70e637a36a961e460bf79a5bf82bc84998 /src
parent06db4d94fde745c39326fe5564b93348610a5674 (diff)
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.cpp2
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) {
std::map<std::string, std::string, std::less<>> PatchManager::GetPatchVersionNames(
VirtualFile update_raw) const {
+ if (title_id == 0)
+ return {};
std::map<std::string, std::string, std::less<>> out;
const auto& installed = Core::System::GetInstance().GetContentProvider();
const auto& disabled = Settings::values.disabled_addons[title_id];