Merge pull request #7668 from spycrab/rpack_fix

UICommon/ResourcePack: Fix packs without manifests crashing Dolphin
This commit is contained in:
Mat M 2019-01-03 13:59:07 -05:00 committed by GitHub
commit 931af76da3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -54,7 +54,11 @@ bool Init()
{ {
const auto& path = pack_list[i]; 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)); 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); ResourcePack pack(path);
if (!pack.IsValid())
return false;
IniFile file = GetPackConfig(); IniFile file = GetPackConfig();
auto* order = file.GetOrCreateSection("Order"); auto* order = file.GetOrCreateSection("Order");