diff options
author | mageven <62494521+mageven@users.noreply.github.com> | 2020-07-15 05:10:17 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-15 09:40:17 +1000 |
commit | 16dafe63166d065f40b57a9b7cf8017a6ba0b1ef (patch) | |
tree | c3fd90116c2cce1cc20853445b13d7abba53e6b6 /Ryujinx.HLE/HOS/ModLoader.cs | |
parent | 2900dda633f4541ac08b452d89514c145836374a (diff) |
mods: Fix crash when loading via LoadCart (#1388)
Diffstat (limited to 'Ryujinx.HLE/HOS/ModLoader.cs')
-rw-r--r-- | Ryujinx.HLE/HOS/ModLoader.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Ryujinx.HLE/HOS/ModLoader.cs b/Ryujinx.HLE/HOS/ModLoader.cs index 654d0cbe..4fb5d0fa 100644 --- a/Ryujinx.HLE/HOS/ModLoader.cs +++ b/Ryujinx.HLE/HOS/ModLoader.cs @@ -451,8 +451,12 @@ namespace Ryujinx.HLE.HOS internal bool ApplyNsoPatches(ulong titleId, params IExecutable[] programs) { - AppMods.TryGetValue(titleId, out ModCache mods); - var nsoMods = Patches.NsoPatches.Concat(mods.ExefsDirs); + IEnumerable<Mod<DirectoryInfo>> nsoMods = Patches.NsoPatches; + + if (AppMods.TryGetValue(titleId, out ModCache mods)) + { + nsoMods = nsoMods.Concat(mods.ExefsDirs); + } // NSO patches are created with offset 0 according to Atmosphere's patcher module // But `Program` doesn't contain the header which is 0x100 bytes. So, we adjust for that here |