diff options
| author | spycrab <spycrab@users.noreply.github.com> | 2019-01-02 22:47:18 +0100 |
|---|---|---|
| committer | spycrab <spycrab@users.noreply.github.com> | 2019-01-02 22:47:18 +0100 |
| commit | c2c23677edeaeb935aa606625be86cc7da29bf5c (patch) | |
| tree | 17bcc3e3fc038a088be884514e0d35b57955105d /Source/Core | |
| parent | aac17bf0d8675cb0572e5182945d1de9bd0487e7 (diff) | |
UICommon/ResourcePack: Fix resource packs without manifests being able to crash dolphin
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/UICommon/ResourcePack/Manager.cpp | 9 |
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"); |
