From 62d772eaedbdd983574d2bfd0022fff58b55ca73 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Wed, 10 Apr 2019 12:29:15 -0400 Subject: 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. --- src/core/file_sys/patch_manager.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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> PatchManager::GetPatchVersionNames( VirtualFile update_raw) const { + if (title_id == 0) + return {}; std::map> out; const auto& installed = Core::System::GetInstance().GetContentProvider(); const auto& disabled = Settings::values.disabled_addons[title_id]; -- cgit v1.2.3