mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-05 09:39:58 +00:00
UICommon/ResourcePack: Fix resource packs without manifests being able to crash dolphin
This commit is contained in:
parent
aac17bf0d8
commit
c2c23677ed
@ -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");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user