misc: prevent crashes

This commit is contained in:
Evan Husted
2024-12-29 23:39:40 -06:00
parent eec92c242c
commit 8fd8a776c9
4 changed files with 28 additions and 7 deletions

View File

@ -752,7 +752,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
Hacks.ShowDirtyHacks.Value = configurationFileFormat.ShowDirtyHacks;
{
EnabledDirtyHack[] hacks = configurationFileFormat.DirtyHacks.Select(EnabledDirtyHack.FromPacked).ToArray();
EnabledDirtyHack[] hacks = (configurationFileFormat.DirtyHacks ?? []).Select(EnabledDirtyHack.FromPacked).ToArray();
Hacks.Xc2MenuSoftlockFix.Value = hacks.Any(it => it.Hack == DirtyHacks.Xc2MenuSoftlockFix);