summaryrefslogtreecommitdiff
path: root/Source/Core/UICommon/ResourcePack/Manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/UICommon/ResourcePack/Manager.cpp')
-rw-r--r--Source/Core/UICommon/ResourcePack/Manager.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/Core/UICommon/ResourcePack/Manager.cpp b/Source/Core/UICommon/ResourcePack/Manager.cpp
index ce739536d4..03456d3428 100644
--- a/Source/Core/UICommon/ResourcePack/Manager.cpp
+++ b/Source/Core/UICommon/ResourcePack/Manager.cpp
@@ -54,7 +54,11 @@ bool Init()
{
const auto& path = pack_list[i];
- error |= !Add(path);
+ if (!Add(path))
+ {
+ error = true;
+ continue;
+ }
order->Set(packs[i].GetManifest()->GetID(), static_cast<u64>(i));
}
@@ -107,6 +111,9 @@ bool Add(const std::string& path, int offset)
ResourcePack pack(path);
+ if (!pack.IsValid())
+ return false;
+
IniFile file = GetPackConfig();
auto* order = file.GetOrCreateSection("Order");