aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys
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
commit1d342149cdaa1fe235515dc27d5ebd2adc8da93d (patch)
tree95371b70e637a36a961e460bf79a5bf82bc84998 /src/core/file_sys
parente4336e33d69e89bf4e409498675d88a04c7a39ac (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/core/file_sys')
-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 0a4f0ea748..e3ebaca03c 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];